Loading ...

How to remove underline in hyperlink in asp.net

Who is online?  0 guests and 0 members
home  »  forums   »  basic asp.net   »  web forms   » How to remove underline in hyperlink in asp.net

How to remove underline in hyperlink in asp.net

Posts under the topic: How to remove underline in hyperlink in asp.net

Posted: 7/7/2011

Lurker 170  points  Lurker
  • Joined on: 9/16/2010
  • Posts: 34

I want to remove underline in hyperlink while page loading or executing. 

 

Plz tell me how to make it

 

 

Thanking you,

J.Vamsidhar


Posted: 7/7/2011

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

May I know why in this world you need this?


Posted: 7/8/2011

Starter 1414  points  Starter
  • Joined on: 12/1/2008
  • Posts: 66

vamsidhar janjanam said:

I want to remove underline in hyperlink while page loading or executing. 

 

Plz tell me how to make it

 

 

Thanking you,

J.Vamsidhar

 

Hi,

<asp:HyperLink ID="hypView" runat="server" Text="View" ></asp:HyperLink>


If you want to do it from cs side then you can do it this way.

hypUrl.ControlStyle.Font.Underline = false;

Thanks & Regards,

Sumit Arora


Posted: 7/22/2011

Lurker 15  points  Lurker
  • Joined on: 7/22/2011
  • Posts: 3

A better way might be to add css class to the hyperlink

<asp:HyperLink ID="hypView" runat="server" Text="View" cssclass="someclass" ></asp:HyperLink>

and in style part put the following code:

.someclass

{

   text-decoration: none;

}

 


Posted: 1/11/2012

Lurker 65  points  Lurker
  • Joined on: 12/16/2011
  • Posts: 9

I believe the "Font-Underline" property in the ASP HyperLink control would also do the job. Just set it to false.

Example:

<asp:HyperLink ID="hlTest" runat="server" Text="View" Font-Underline="false" ></asp:HyperLink>



Page 1 of 1 (5 items)