question about using Process.Start() to access a web page

cmd_17

Member
Joined
Dec 7, 2008
Messages
13
Programming Experience
Beginner
I have a Windows Forms application where I'd like the user to click on a button and have a certain web page open up in the user's default browser, which may or may not be Internet Explorer. I've been able to do this using the following code:

VB.NET:
Dim proc As New Process()
proc.StartInfo.FileName = "http://www.mysite.com/somepage.aspx"
proc.Start()

Now here's where I'm stuck...

In addition to the page opening in the user's default browser, I also need to somehow automatically fill in and submit the form on that page so that the user can be redirected to the appropriate page, where he/she can continue with the task at hand. While I'm aware that the automatic form submission can be done using either a WebBrowser control or an HttpWebRequest, these are not good options for this particular application.

Is it possible to open the page in the default browser as shown above and then programmatically access the HTML code on that page once it's opened?
 
As of right now, this thread has had 37 views and no replies. When I started it, I had the feeling that I was asking for a miracle...or maybe my question is so stupid that no one has the heart to tell me. :)

After many more hours of research and brainstorming, I found not one, but two ways that this could be done:

1) Write code to figure out what the default browser is and then perhaps modify the code here to suit my purpose. I did not try this approach, as the second solution is more practical.

2) Since I control the web site that will be opened in the user's default browser, I just created a new page with the same form, only this page accepts query string data that will be used to pull the user's info from a database and populate the input fields.
 
Back
Top