Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Setting and Redirecting to a Page Anchor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C. Barber - 16 Sep 2007 19:57 GMT
I'm using VB 2005 and ASP.NET, and after a postback I want to update the
page and return to a specific Anchor tag on that page.  I've not been able
to find out how to do this, and as you probably know, the MS VS 2005
documentation is virtually useless compared to, say, VS 6.

Can someone tell me if there's any secret to inserting an Anchor tag into my
ASP page, and then how to get the page to go back to that Anchor tag, rather
than just at the top.

Thanks!
Mark Fitzpatrick - 16 Sep 2007 20:18 GMT
To go to that anchor you really need to redirect back to the page again,
passing the anchor to it as such mypage.aspx#mybookmark It can probably be
done by inserting JavaScript into the page through a literal control, but I
haven't ever had to do this myself. Keep in mind, a lot of the things aren't
going to be in the documentation because they aren't really applicable to
the tools but the technology in general which is covered very well in other
places. It was much easier to write documentation for VS6 when so little of
the suite was devoted to anything other than building desktop apps and
services, the web has it's very own techniques and most of them come about
outside the realm of documentation anyways.

Signature

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

> I'm using VB 2005 and ASP.NET, and after a postback I want to update the
> page and return to a specific Anchor tag on that page.  I've not been able
[quoted text clipped - 8 lines]
>
> Thanks!
Nick Chan - 17 Sep 2007 03:44 GMT
hi u can do something like this

dim x as new literal
x.text = "<a name=""blabla""/><script>window.onload=function()
{location.href='#blabla'}</script>"
form.controls.add(x)

> I'm using VB 2005 and ASP.NET, and after a postback I want to update the
> page and return to a specific Anchor tag on that page.  I've not been able
[quoted text clipped - 6 lines]
>
> Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.