When I click the one of the command source , like name.. it changes the bgcolor for that name , but I also want to click one more time on same name to to disable bg color..
How can i achieve this?
Thanks in advanced!
Home / DeveloperSection / Forums / How to use Linkbutton in Gridview using C#
When I click the one of the command source , like name.. it changes the bgcolor for that name , but I also want to click one more time on same name to to disable bg color..
How can i achieve this?
Thanks in advanced!
Anonymous User
05-Oct-2013Maintain a hidden variable near to that button and set the value of that as "0" by default. Every time you click on the adjacent button, Increase the value of this hidden variable. Now in the click event you can check the current value and decide whether you want to change the background color to Blue or Re or whatever color you want