add anchor to url

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.
 
G

Guest

Howdy,

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

regards
 
A

Aamir Ghanchi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top