<a href="/wiki/Special:Random" title="Load a random article [alt-shift-x]" accesskey="x">Random article</a>
foreach (System.Windows.Forms.HtmlElement html in webBrowser1.Document.GetElementsByTagName("a")) { if (html.InnerText == "Random article") { html.InvokeMember("click"); } }
Navigating
private void webBrowser_Navigating (object sender, WebBrowserNavigatingEventArgs e) { e.Cancel = true; // to prevent browser control from going to link MessageBox.Show ("Hello"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)