How do I prevent a LinkLabel from drawing iteself underlined?

I need a LinkLable that's blue but not underlined. Can I do that easily?
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
CuteBugConnect With a Mentor Commented:
Set the LinkBehavior property of the link label

linkLabel1.= System.Windows.Forms.LinkBehavior.NeverUnderline;
0
 
PhSyChoTiKCommented:
Try this for all links:

    <STYLE TYPE="text/css">
      <!--
        A
        {
          text-decoration : none;
          color : #0000FF;
          font-weight: bold;
          cursor: hand;
        }
        A:Hover
        {
          text-decoration: underline + overline;
          color: #FFD700;
          font-weight: bold;
          cursor: hand;
        }
      // -->
    </STYLE>



... and if you just want it on specific links... try:

    <STYLE TYPE="text/css">
      <!--
        .noUL
        {
          text-decoration : none;
          color : #0000FF;
          font-weight: bold;
          cursor: hand;
        }
        .noUL:Hover
        {
          text-decoration: underline + overline;
          color: #FFD700;
          font-weight: bold;
          cursor: hand;
        }
      // -->
    </STYLE>

...and the specific links you would format them as...

<A CLASS="noUL" .......
0
 
newbiewebSr. Software EngineerAuthor Commented:
Sorry, I forgot to say I use C# WinForms.
0
 
PhSyChoTiKCommented:
...forgot to add... if you don't want to define the class... you can always just use:

<A STYLE="text-decoration : none; color : #0000FF; font-weight: bold;cursor: hand;" HREF="..............
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.