Reputation: 1778
We have an existing VB.net application. Upon an event, we need to open a browser window. I'm able to open the browser window like this:
System.Diagnostics.Process.Start("http://s3web01/suggestions?item=" + strItem + "&co=" + strOrder)
Upon another event, we need to refresh the browser window with different parameters for strItem and strOrder.
If I call the same code above, it opens a new tab in the browser window. Is there any way to refresh the same browser window that was previously opened?
Upvotes: 2
Views: 2309
Reputation: 33738
Add a reference to the following COM libraries: Microsoft Internet Controls
(namespace ShDocVw), and Microsoft HTML Object Library
(namespace mshtml).
Then you can create a new IE instance:
Dim IE As ShDocVw.InternetExplorer = New ShDocVw.InternetExplorer
and control it like so: IE.Navigate("http://blah.com")
refresh it like so: IE.Refresh
etc
Upvotes: 1