As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop a desktop application. It has to connect to a website and click a 'Submit' button on one of its pages. Basically we have to read a excel sheet (contains invoice numbers),for each invoice number need to hit the 'Submit' button.
Now I have read we can use webbrowser controls , but my requirement is the website should not be opened in the browser , it should all be done internally without opening in any browser, Connect to website , fetch each number and hit a submit button.
Any pointers on this would be helpful.
it is a good idea to use web service for this IF you can deploy the web service to the website.
if not, you will have to use the web browser control. the web browser control does NOT have to be on the form. you can create a web browser object on the fly. check
WebBrowser Control in a new thread
but, web browser usually has more overhead.
instead, you can use fiddler to sniff the traffic and use httpwebrequest/webrequest class to do this.
You could use the WebRequest class to post the data. See this:
http://www.netomatix.com/httppostdata.aspx
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm asked to build a simple web site. Every page of this site is mainly text. I want them to be able to change all the text dynamicly.
What is a better way:
1) To store all the text in database.
2) On text change replace existing aspx file with new one with changed text.
I would prefer a way where the changed pages will load faster on client side
Given these requirements, your best solution is a CMS (content management system).
There are plenty of options for asp.net, like Umbraco, DotNetNuke etc.
Doing this by storing all the text in the database will be just like implementing a CMS. The second option is really really old school. You may as well put static html pages on the server in that case.
You should change text in the controller. Don't replace pages.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
My requirement is
Should have a option to attach file in each row of a repeater
Once I clicked to upload, I have to pass a id and need to execute the insert query
Is there any way to do this using ajax asynchronous?
The IDs of the uploader controls are going to be generated dynamically so you're gonna run into the challenge of identifying which upload control it is that you're trying to get a file from. The way I accomplished this was to use jQuery to find the nearest upload control to the button that was clicked. To "tag" the controls, I assigned a dummy css class that could be selected by jQuery. From there, you can build a JSON object to pass to your service or page method for the processing of your insert operation.
There are other options to handle submitting ALL uploader controls, of course, but you weren't very clear on what you've tried or what the bigger picture here is. You didn't give any specifics in your question, so I'm not giving any specifics for an answer. This is just offering a path to take. Good luck.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I always roll my own authentication -- I have a control issues.
In a web app using Web Forms, which is a better way to drag along user information through a site:
Save User object to Session, grab object from Session on page load/init.
Save UserId to Session, instantiate new user obj on page load/init.
A better way that I don't know about.
Assume 1 web server is being used.
I prefer #2 b/c it guarantees up-to-date data, but it does make more trips to the db.
Please give advantages/disadvantages.
-iw
Door #2 Ian.
Rolling your own can definitely have its drawbacks - especially in security (Such as liability, which is ALL on you now). Save your user data in the database. When the user logs in then check to see if they are authenticated and then just take their user authorization with them in the session which should, in my opinion, be stored on your filesystem (not database) if this is how you are handling security.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am developing an application that will automate some tasks for me. The application needs to download an excel file, do some manipulations and write some data to the DB.
I have the excel automation and db writing code done, but I'm having some trouble with the browser automation.
What would be the best way to do the browser automation? What it needs to do is:
Go to a url
Set some dropdownlists
Click a button
save the excel file in the right place.
I have never done browser automation. What would be the best way to get this done?
Depending on the version, Visual Studio 2010 can do this, via the Test tools. (mentioned in case you have a version with the feature but are unaware of it.)
I believe you need either the Test edition or the Ultimate edition for these features.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison
Use a browser automation tool, such as Selenium or WATIR.
These let you script most aspects of browser work (definitely going to a URL, setting form elements and clicking).
If you need full automation, please pick http://watin.org/ for example. For what you write, however, the WebRequest should be enough, you'd only have to sniff requests with any http debugger (like Fiddler) and be able to replay them with web requests.
I would recommend Selenium as well. I use version 2 (WebDriver) extensively for this type of automation. The only problem I see is that the Save File dialog is not something easily driven by Selenium. There are a couple of workarounds out there though. Does the clicking of the button open a dialog for download or is the button just a link to the url containing the download?
Why, What and How of Software Test Automation ?
very nice article see here
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am trying to set up a push notification service for my WP7 app.
I have followed the guides and built a WCF service with WPF front end based on the code provided by the Channel9 WP7 jump start guide (Weather Service exmaple) ; http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingPushNotificationsLab/Exercise-2-Introduction-to-the-Toast-and-Tile-Notifications-for-Alerts
This all works locally with the address "http://localhost:8000/RegirstatorService"
The part I am cluless about is how I translate this app to my server and make it work in the real world.
I have a basic public facing server 2008 setup with a domain and IIS7 running.
What do I do with the WPF app to make it work on my server? Is it just a case of changing the endpoint address so somehwere on my server, and where do i locate it on my server.
any pointers would be helpful. i have had a good read around the web but still cant understand this part of the whole PN process. I ahve never dealt with WCF before and dont have much expreirence with web servers or IIS.
Many thanks.
You might to check out these posts for a more real world example:
http://benjii.me/2010/12/push-notifications-in-windows-phone-7-1-code-on-the-device/
http://benjii.me/2011/01/push-notifications-in-windows-phone-7-2-code-on-the-server/
http://benjii.me/2011/04/push-notifications-in-windows-phone-7-3-push-that-notification/
You're probably most interested in the second one.