How to use Linkbutton in Gridview using C#

Total Post:22

Points:154
C# 
C#
 1411  View(s)
Ratings:
Rate this:

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!

  1. Post:30

    Points:210
    Re: How to use Linkbutton in Gridview using C#

    Maintain 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

      Modified On Mar-31-2018 05:49:40 AM

Answer