Change Button color in gridview asp.net?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 8, 2015, 7:59 PM EDT
You can add column status in table set default bind 0
and on click button update it as 1
and on gridview rowdatabound
check from database if status is 1
btn.backcolor=green;//System.Drawing.Backcolor.Green
else
btn.backcolor=red;