By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,327 Members | 849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,327 IT Pros & Developers. It's quick & easy.

HtmlAnchor

P: n/a
Is there a way to simulate clicking a HtmlAnchor in .NET Code?


Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
How about Response.Redirect("~\webform1.aspx#anchorname") ???

HTH,
Greg

"Gabe Garza" <ga*******************@sbcglobal.net> wrote in message
news:zv*****************@newssvr27.news.prodigy.co m...
Is there a way to simulate clicking a HtmlAnchor in .NET Code?

Nov 21 '05 #2

P: n/a
I figured out a way using RegisterClientScriptBlock() and adding JavaScript
code at the bottom of the HTML section that sets the anchor using
document.location.hash = anchorname;

Within the JavaScript that I added with RegisterClientScriptBlock() I set
'anchorname' to the anchor that I want to anchor too.

Once the page gets to the bottom of the HTML section, document.location.hash
= anchorname; gets called and the client's page will be adjusted to the
anchor.
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How about Response.Redirect("~\webform1.aspx#anchorname") ???

HTH,
Greg

"Gabe Garza" <ga*******************@sbcglobal.net> wrote in message
news:zv*****************@newssvr27.news.prodigy.co m...
Is there a way to simulate clicking a HtmlAnchor in .NET Code?


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.