Hyperlink within a label

Discussion in 'ASP .Net Web Controls' started by duncans, Jan 5, 2006.

  1. duncans

    duncans Guest

    I have seen a couple of posts that sort of aswer my question but I am feeling
    particularly dense in 2006. I want to have a 'label' that contains within it
    a link to another page. I could use a link button, I suppose, but I don't
    necessarily want the entire text to be a hyperlink; just a word or two. An
    example might be:

    "Want more information? Just click here!" (where, for example, only the word
    "here" is linked to a new page). Thanks for some direction here (no pun
    intended)!!
    --
    Duncan Sutherland
     
    duncans, Jan 5, 2006
    #1
    1. Advertising

  2. <asp:TemplateColumn >
    <ItemTemplate>
    Want more information? Just click
    <a href='<%# DataBinder.Eval(Container.DataItem,
    "DataNavigateUrlFieldName")%>'>Here</a>
    </ItemTemplate>
    </asp:TemplateColumn>

    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "duncans" wrote:

    > I have seen a couple of posts that sort of aswer my question but I am feeling
    > particularly dense in 2006. I want to have a 'label' that contains within it
    > a link to another page. I could use a link button, I suppose, but I don't
    > necessarily want the entire text to be a hyperlink; just a word or two. An
    > example might be:
    >
    > "Want more information? Just click here!" (where, for example, only the word
    > "here" is linked to a new page). Thanks for some direction here (no pun
    > intended)!!
    > --
    > Duncan Sutherland
     
    Phillip Williams, Jan 5, 2006
    #2
    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. Shapper
    Replies:
    2
    Views:
    744
    Scott Mitchell [MVP]
    May 7, 2005
  2. Josef K.

    <label><div></div></label> allowed?

    Josef K., May 20, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    13,462
    Josef K.
    May 22, 2005
  3. Praveen
    Replies:
    1
    Views:
    986
    Rob Williscroft
    Nov 5, 2006
  4. CSharpner
    Replies:
    0
    Views:
    1,048
    CSharpner
    Apr 9, 2007
  5. Knut Krueger
    Replies:
    8
    Views:
    280
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page