I am a starter with c# programming language. I placed a simple web browser into a window form. I assign a url address to the browser and I want to see if the browser successfully opened the link I provided.
I know that there is a eventhandler called
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
however, after assigning the url for the browser, I want to write something like
if (webBrowser1_DocumentCompleted)
{
//my code here
}
is this possible? I know you can use "WebBrowserReadyState" but I would prefer to try and use Document ready.
I'm not sure if this is what you are looking for but this is what I would try:
first create an Event Handler in the Constructor of your form class:
After this you need to create a method that will be called when that event is fired:
Hope this helps!