I want to navigate to new tab when click on anchor. My code : Hide Copy Code
Dim elements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
For Each pElem As HtmlElement In elements
If (pElem.GetAttribute("HREF") <> "" AndAlso pElem.GetAttribute("HREF") <> "#" Then
WebBrowser1.AllowNavigation = True
pElem.SetAttribute("target", "_Blank")
pElem.InvokeMember("click")
End If
Next
When i Perform Click it will open in IE Browser instead of Web-Browser Control. Please brief me what I am doing wrong?
FYI, Instead of Navigate using URL i want to Navigate Using click and its compulsory.
Thanks in advance.