I have a Windows form application with a browser added in. I would like it so when the URL changes, say when navigating to a new page, that it copies the new URL. How can I achieve this?
Searched everywhere with no results.
CodePudding user response:
You could achieve this with the Navigated Event.
// Navigated event
private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
string url = webBrowser1.Url.ToString();
//COPY THE URL HERE HOWEVER YOU LIKE
}