Can a 'bookmark' link be put in an asp.net page?

C

COHENMARVIN

In html I learned that you could have a tag such as:
<a name="go_here">
Then, if you linked to the page, as follows <a
href="MyPage.htm#go_here">
You would go to the particular position
in the page where 'go_here' was.
I need to do something like that, but Visual Studio doesn't have any
tag that looks like:
<a name="etc
Is this something that can be done in VS?
Or is there a better way to make a page go to a particular position in
the page?
Thanks,
Marv
 
J

Juan T. Llibre

re:
!> is there a better way to make a page go to a particular position in the page?

There's several approaches to that.

The simplest is to use a Page directive :

<%@ Page MaintainScrollPositionOnPostback="true"%>

Then, there's Fredrik Normén's script :

http://forums.asp.net/p/948134/1149902.aspx

Then, there's Jeff Prosise's script :
http://searchwindevelopment.techtarget.com/tip/0,289483,sid8_gci931802,00.html

However, none of those work with external links, only with postbacks.

If you don't want the page to start at the top, you can use a control and set focus to it :

SomeControl.SetFocus()
 
J

Juan T. Llibre

re:
!> It's not an ASP.Net kind of thing - -

That's not what the OP was asking about.

He wants to know whether a link like
<a href="MyPage.htm#go_here"> works in ASP.NET.

It does not.
 

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