Link to home
Start Free TrialLog in
Avatar of pointeman
pointemanFlag for United States of America

asked on

Gridview Linkbutton Disable and Keep Black Forecolor?

I can disable a Linkbutton in a Gridview like so. I also need to keep its normal 'Black' forecolor. My Forecolor attempt is not working, still grayed-out. Help.                

                   LinkButton lb = (LinkButton)e.Row.FindControl("lbPartNo");

                    if (lb.Text.Trim() == "123456")
                    {
                        lb.Enabled = false;
                        lb.ForeColor = System.Drawing.Color.Black;
                    }
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pointeman

ASKER

Thx