PDA

View Full Version : Vb .net code to jump to a location in a web page



rhu
Sep 15th, 2009, 04:59 AM
I'm trying to write a vb .net program to navigate a web page. The program can jump to a specific tag location in the web page instead of always display from top. How can I do that?

many thanks!

abduraooft
Sep 15th, 2009, 07:22 AM
You may use "named anchor", by giving a unique id attribute to the required element, say

<h3 id="third">Third heading</h3>. After that, you may append #third to the url of your page, like mypage.htm#third, which when accessed, will automatically scroll the page to that element.

rhu
Sep 16th, 2009, 03:27 AM
thank you! It works.