add a link to the end of the text label

Discussion in 'ASP .Net' started by Nalaka, May 9, 2006.

  1. Nalaka

    Nalaka Guest

    Hi....
    I have a multi-line label that shows the first 80 characters of a long paragraph.

    I need to add read-more link to the end of this label so a user click will show the whole paragraph (on a different page).


    Current look:

    Please, restore the database to its
    latest prodcution...
    read more


    I need this to look like:

    Please, restore the database to its
    latest prodcution... read more


    is this possible using two controls "Label" and "HyperLink".....


    any help is very much appreaciated
    Nalaka
    Nalaka, May 9, 2006
    #1
    1. Advertising

  2. Unless you put a <br> tag or something else that will explicitly cause a line break between the Label and HyperLink, you should get the desired look anyway. In Visual Studio .NET 2003 (I haven't used 2005, so I don't know if they fixed it in that version), it places them on separate lines even if that is not how they would appear in the browser (yeah, I find this annoying too, but once you learn to recognize it, it's not that bad in most cases). You can always check by viewing your page in the browser. Also, a suggestion that I might make for your case would be to make a simple UserControl, since it looks like the only properties that you will be changing in most cases will be:

    1. The paragraph text that you do show
    2. The URL that the "read more" Hyperlink will take them to

    If you would like, I can help you make this UserControl if you are unfamiliar with them. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    "Nalaka" <> wrote in message news:...
    Hi....
    I have a multi-line label that shows the first 80 characters of a long paragraph.

    I need to add read-more link to the end of this label so a user click will show the whole paragraph (on a different page).


    Current look:

    Please, restore the database to its
    latest prodcution...
    read more


    I need this to look like:

    Please, restore the database to its
    latest prodcution... read more


    is this possible using two controls "Label" and "HyperLink".....


    any help is very much appreaciated
    Nalaka
    Nathan Sokalski, May 10, 2006
    #2
    1. Advertising

  3. Nalaka

    Nalaka Guest

    Thanks...
    I did not realize that, me putting the line break between the controls in what causing it.
    Let me try putting in the same row.

    Nalaka

    "Nathan Sokalski" <> wrote in message news:u%23GYyA%...
    Unless you put a <br> tag or something else that will explicitly cause a line break between the Label and HyperLink, you should get the desired look anyway. In Visual Studio .NET 2003 (I haven't used 2005, so I don't know if they fixed it in that version), it places them on separate lines even if that is not how they would appear in the browser (yeah, I find this annoying too, but once you learn to recognize it, it's not that bad in most cases). You can always check by viewing your page in the browser. Also, a suggestion that I might make for your case would be to make a simple UserControl, since it looks like the only properties that you will be changing in most cases will be:

    1. The paragraph text that you do show
    2. The URL that the "read more" Hyperlink will take them to

    If you would like, I can help you make this UserControl if you are unfamiliar with them. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    "Nalaka" <> wrote in message news:...
    Hi....
    I have a multi-line label that shows the first 80 characters of a long paragraph.

    I need to add read-more link to the end of this label so a user click will show the whole paragraph (on a different page).


    Current look:

    Please, restore the database to its
    latest prodcution...
    read more


    I need this to look like:

    Please, restore the database to its
    latest prodcution... read more


    is this possible using two controls "Label" and "HyperLink".....


    any help is very much appreaciated
    Nalaka
    Nalaka, May 10, 2006
    #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. Shapper
    Replies:
    2
    Views:
    713
    Scott Mitchell [MVP]
    May 7, 2005
  2. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    783
    Kevin Spencer
    May 17, 2005
  3. Murali
    Replies:
    2
    Views:
    532
    Jerry Coffin
    Mar 9, 2006
  4. CSharpner
    Replies:
    0
    Views:
    980
    CSharpner
    Apr 9, 2007
  5. Knut Krueger
    Replies:
    8
    Views:
    238
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page