Button click problem in asp.net

Posted by Suneel161 under Regular Expressions on 8/26/2010 | Points: 10 | Views : 1439 | Status : [Member] | Replies : 1
I have a button in a page and when i click the button it ll start no of clicks on a button.when the page is loaded it is starting from 0 again.
It should not start from 0 when i click the button.
Help me out


Posted by: Vuyiswamb on: 8/26/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

You need a Global variable for this , most of the time you can do this in the Global.asa ,

But the reason is that every time the page loads it will initialize the value. You can do it Global like this


instead of adding that code to a page load event, add it to your click event of your button

Thank you for posting at Dotnetfunda

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response