I have a linkbutton named "linkbutton1" on my webpage in asp.net(c#)
Now i want to change color of linkbutton1 when it gets disabled.
I want to do this using an event which will fire on disabled process of linkbutton
Same as there is an event of RowDatabound in gridview control, which fires when we call databind() method.
Same way when i make my linkbutton1 disabled,i.e enable=false, an event should fire which will change the color of linkbutton1,

How can i do this in C#

Recommended Answers

All 2 Replies

linkbutton.Attributes.Add("class", "leftmenuselectedtab")

MarkAnd911,

Take a look at this page. It's not exactly the same as what you are looking for, but the idea is to dynamically change the css, so this should do the trick.

Hope it helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.