add anchor to url

  • Thread starter Thread starter Aamir Ghanchi
  • Start date Start date
A

Aamir Ghanchi

Hi,

how can I add anchor to the url in a LinkButton click event handler. I
have an anchor already defined on the page, but there is no way to
scroll down to that location at postback.

thanks in advance.
 
Howdy,

ClientScript.RegisterStartupScript(this.GetType(), "anchorScroll",
"<script type=\"\">\n" +
"window.location.hash = 'myAnchor';" +
"</script>");

regards
 
Howdy,

ClientScript.RegisterStartupScript(this.GetType(), "anchorScroll",
"<script type=\"\">\n" +
"window.location.hash = 'myAnchor';" +
"</script>");

regards
--
Milosz







- Show quoted text -

Thanks for the reponse folks.
Milosz, your solution worked out very well !
Thanks again.
 
Back
Top