Hi everone.
I need to find a way to get the URL from a link that has been clicked
on a website so that I can compare it to a URL on a safe list I have.
I'm using C# Browser control, and I have a LinkClick event handler. I
just don't know how to get the actual URL out of it. Can someone please
help? Thanks.
Loading
Kirtan PatelPosted Sep 15, 2009, 10:22 PM
please dont forget to mark "Do you like answer" it will give me some credits :)
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
//Show Captured URL In msg Box
MessageBox.Show("Captured URL :" + e.Url.ToString());
}
Kirtan PatelPosted Sep 15, 2009, 10:52 PM
you can see i have told the same Why you repeating Code ?
Master BillaPosted Sep 15, 2009, 10:45 PM
You can use the navigating event to this to get url when you are click the hyper link in your web broswer control
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
string currentURl= e.Url.ToString());
}
thank you
BryanPosted Sep 15, 2009, 12:10 PM
I didn't see the part to get the link URL. Do you think you could point me in a more specific location for it? Thank you.