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:
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?
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?