Navigating to a bookmark on page?

  • Thread starter Thread starter John Carnahan
  • Start date Start date
J

John Carnahan

How would I accomplish the following ?
Navigate to a bookmark on a page from a routine in the code behind.

---- html code

bookmark1 (someplace on the page... is this an htmlanchor?)
?? how do I define the bookmark??

bookmark2 (somwhere else down the page)

-----

--- Code behind file

Sub GotoBookmark(byVal myBookmark As String)
' what goes here ??
?? NavigateToBookmark(myBookMark) ????
End Sub
 
Hi
this can be done. The html bookmark code is of the form
<A name='#bookmark1'></A>"
The server code that causes the browser to jump to it is
a script function that runs when the page loads
string script = "<SCRIPT
language='javascript'>location.href='#bookmark';</SCRIPT>"
;
Page.RegisterStartupScript("startupscript",script);

alex
 
Back
Top