How to use Linkbutton in Gridview using C#

Total Post:22


 1956  View(s)
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. 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


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.