I set url value of a WebBrowser object on an event. Sometimes setting up of this value is not getting reflected in webBrowser.
The code I used is
webBrowser.Url= new Uri("www.google.com")
I also tried webBrowser.Navigate() but same behavior. Any ideas why it could be happening and what to do to overcome this?
Although very old question, for people visiting this, please check AllowNavigation property set on the WebBrowser instance.
As per MSDN documentation -
This property does not prevent you from loading an initial page by setting the Url, DocumentText or DocumentStream property, but will prevent all subsequent navigation.
You can find more details here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With