Change Color of LinkButton

R

Robert E. Flaherty

How does one go about changing the foreground color of a linkbutton like
"Select"?
 
R

Robert E. Flaherty

I don't have a clue as to how to embed style tags inside the Head portion
nor did reviewing the suggested site help.

What I have is the following inside the definition of a datagrid:
,asp:ButtonColumn Text="Email" CommandName="Select" ></asp:ButtonColumn>. I
would like the "Email" end up in blue and underlined like
(e-mail address removed).

Mona said:
Hi Robert,

You can change the foreground color of a linkbutton by embedding style
tags
inside the Head portion of the HTML . For more information on this, I
would
request you to please go through the following site :
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/a.asp

Hope this helps.

Regards,
Mona [Grapecity]

Robert E. Flaherty said:
How does one go about changing the foreground color of a linkbutton like
"Select"?
 
E

Elton Wang

Hi Robert,

There are two options you can use to change foreground of linkbutton:

1) In page's HTML Design View, to set the linkbutton's ItemStyle-ForeColor
property.

2) Or in datagrid_ItemDataBound event, use code to change linkbutton's
foreground:

LinkButton selectBtn = (LinkButton)e.Item.Cells[select_index].Controls[0];
selectBtn.ForeColor = Color.Red;

HTH

Elton Wang
 
E

Elton Wang

Hi Robert,

There are two options you can use to change foreground of linkbutton:

1) In page's HTML Design View, to set the linkbutton's ItemStyle-ForeColor
property.

2) Or in datagrid_ItemDataBound event, use code to change linkbutton's
foreground:

LinkButton selectBtn = (LinkButton)e.Item.Cells[select_index].Controls[0];
selectBtn.ForeColor = Color.Red;

HTH

Elton Wang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top