Click here to Skip to main content
15,851,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to know how navigate to next page on google search automatically (123456789). I found this code but I don't know how use it.

VB
Dim temp = WebBrowser1.Document.GetElementById("pnnext")
  If temp Is Nothing OrElse TryCast(temp.DomElement, mshtml.HTMLAnchorElement) Is Nothing Then
   Return
  End If
Posted
Updated 9-Aug-11 7:37am
v2
Comments
Sam_IDEA 9-Aug-11 12:26pm    
Please elaborate your question. I'm not getting what you want to say.
-Sammy
edumaite 9-Aug-11 12:36pm    
Sure. I am making a small google tool and I want auto click on button called "next" for navigate to the next page on google search.Sorry for my bad english.Thanks.

1 solution

Just get the value of the href attribute inside that element, and navigate to it.
 
Share this answer
 
Comments
edumaite 9-Aug-11 12:46pm    
I trying but I can not get it:
<span style="display:block;margin-left:53px;text-decoration:underline"> Next </span>
I can not find any id element.Can you help me?
edumaite 9-Aug-11 12:47pm    
<span class="csb ch" style="background-position:-96px 0;width:71px"></span>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900