document linking

Discussion in 'ASP .Net' started by bill yeager, Jun 5, 2004.

  1. bill yeager

    bill yeager Guest

    I'd like to link to another part of my document within my
    aspx page.

    I have the following code in my HTML:

    <code>
    <A HREF="#PositionsHeld">Positions Held</A>

    <asp:label id="lblPosition" style="Z-INDEX: 107; LEFT:
    16px; POSITION: absolute; TOP: 816px"
    runat="server" Font-
    Underline="True" Font-Bold="True" Font-
    Size="Larger">Positions Held</asp:label>

    <H2 id="PositionsHeld"></H2>
    </code>

    I would like the link to go directly right after the
    above label. I thought I would be achieving this by using
    the "<H2 id="PositionsHeld"></H2>" . When I click on the
    link, it brings me down some on the document, but nowhere
    near this label.

    What am I doing wrong?
    bill yeager, Jun 5, 2004
    #1
    1. Advertising

  2. Hi Bill,

    Maybe you want to try the other syntax for the anchor?

    <a href="#PositionsHeld" target=_self >Positions Held</a>

    <H2><A name="PositionsHeld">Info here</A></H2>


    "bill yeager" <> wrote in message
    news:18b1801c44b34$a60032f0$...
    > I'd like to link to another part of my document within my
    > aspx page.
    >
    > I have the following code in my HTML:
    >
    > <code>
    > <A HREF="#PositionsHeld">Positions Held</A>
    >
    > <asp:label id="lblPosition" style="Z-INDEX: 107; LEFT:
    > 16px; POSITION: absolute; TOP: 816px"
    > runat="server" Font-
    > Underline="True" Font-Bold="True" Font-
    > Size="Larger">Positions Held</asp:label>
    >
    > <H2 id="PositionsHeld"></H2>
    > </code>
    >
    > I would like the link to go directly right after the
    > above label. I thought I would be achieving this by using
    > the "<H2 id="PositionsHeld"></H2>" . When I click on the
    > link, it brings me down some on the document, but nowhere
    > near this label.
    >
    > What am I doing wrong?
    Ken Cox [Microsoft MVP], Jun 6, 2004
    #2
    1. Advertising

  3. bill yeager

    bill yeager Guest

    Ken, I tried it, but it still doesn't scroll to the
    destination anchor tag...
    >-----Original Message-----
    >Hi Bill,
    >
    >Maybe you want to try the other syntax for the anchor?
    >
    > <a href="#PositionsHeld" target=_self >Positions

    Held</a>
    >
    ><H2><A name="PositionsHeld">Info here</A></H2>
    >
    >
    >"bill yeager" <>

    wrote in message
    >news:18b1801c44b34$a60032f0$...
    >> I'd like to link to another part of my document within

    my
    >> aspx page.
    >>
    >> I have the following code in my HTML:
    >>
    >> <code>
    >> <A HREF="#PositionsHeld">Positions Held</A>
    >>
    >> <asp:label id="lblPosition" style="Z-INDEX: 107; LEFT:
    >> 16px; POSITION: absolute; TOP: 816px"
    >> runat="server" Font-
    >> Underline="True" Font-Bold="True" Font-
    >> Size="Larger">Positions Held</asp:label>
    >>
    >> <H2 id="PositionsHeld"></H2>
    >> </code>
    >>
    >> I would like the link to go directly right after the
    >> above label. I thought I would be achieving this by

    using
    >> the "<H2 id="PositionsHeld"></H2>" . When I click on

    the
    >> link, it brings me down some on the document, but

    nowhere
    >> near this label.
    >>
    >> What am I doing wrong?

    >
    >.
    >
    bill yeager, Jun 6, 2004
    #3
    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. news.microsoft.com

    linking to a document from a subfolder.

    news.microsoft.com, Jan 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    =?Utf-8?B?U2NvdHQgU2ltb25z?=
    Jan 19, 2005
  2. Steve Carrow
    Replies:
    0
    Views:
    534
    Steve Carrow
    Jul 28, 2003
  3. Wendy S
    Replies:
    1
    Views:
    6,314
    Darren Davison
    Aug 5, 2003
  4. UndoMiel
    Replies:
    1
    Views:
    400
    Keith M. Corbett
    Sep 21, 2004
  5. mathieu

    Linking within XML document

    mathieu, Apr 12, 2010, in forum: XML
    Replies:
    0
    Views:
    1,020
    mathieu
    Apr 12, 2010
Loading...

Share This Page