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

Discussion in 'ASP .Net' started by COHENMARVIN@lycos.com, Jun 5, 2008.

  1. Guest

    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
     
    , Jun 5, 2008
    #1
    1. Advertising

  2. David Wier Guest

    It's not an ASP.Net kind of thing - -
    check out:
    http://www.yourhtmlsource.com/javascript/scripts/addthispagetofavorites.html

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    <> wrote in message
    news:...
    > 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
     
    David Wier, Jun 5, 2008
    #2
    1. Advertising

  3. 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()



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    > 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
     
    Juan T. Llibre, Jun 5, 2008
    #3
  4. 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.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "David Wier" <> wrote in message news:%...
    > It's not an ASP.Net kind of thing - -
    > check out:
    > http://www.yourhtmlsource.com/javascript/scripts/addthispagetofavorites.html
    >
    > David Wier
    > http://aspnet101.com
    > http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no bloated markup
    >
    >
    > <> wrote in message news:...
    >> 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

    >
    >
     
    Juan T. Llibre, Jun 5, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Carnahan

    Navigating to a bookmark on page?

    John Carnahan, Nov 13, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    547
    John Carnahan
    Nov 13, 2003
  2. Sara T.

    ASP.NET and Bookmark

    Sara T., Aug 9, 2004, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    170
    Sara T.
    Aug 9, 2004
  3. Wouter
    Replies:
    14
    Views:
    317
  4. Replies:
    0
    Views:
    89
  5. MS
    Replies:
    5
    Views:
    169
Loading...

Share This Page