InvokeMember that is not a button?

assafey

Member
Joined
Apr 13, 2009
Messages
10
Programming Experience
1-3
Hi,

I have this HTML code:

HTML:
<div class="t_block"><a name="pass2889" href="download.php?id=2889" style="color:black"><b>�� �����</b></a> | <b>����:</b>

This code is for a lable (I think) in the Web page of WebBrowser. This lable can be clicked with the mouse and then a green text is being shown.

I tried to use this code to click on the black lable and show the green text:

VB.NET:
For Each link As HtmlElement In WebBrowser1.Document.GetElementByTagName("div")
If link.GetAttribute("name").StartsWith = "pass" then
path = link.GetAttribute("href").ToString
Exit For
End If
Next

For Each button As HtmlElement In WebBrowser1.Document.GetElementByTagName("div")
If button.GetAttribute("href").StartsWith(path) then
button.InvokeMember("click")
Exit For
End If
Next

But nothing happad, even when I click with my mouse on the WebBrowser lable manually the lable doesn't open.

In Internet Explorer Web Page it does open.

Why is it? can someone help me, please.

Thanks.
 
Last edited:
Back
Top