The page load event will fire whenever you click a server side button or other control
So every time you click a button your timing thing will run in page load event, to prevent that
so that it runs only for the first time on the page load (and not on button clicks), you should
put that code inside page load, inside the if condition:
if(!Page.IsPostBack)
{
}
Usman Waheed
Marked as answer by gene7135 on Apr 08, 2012 06:51 PM
usman400
Contributor
3503 Points
721 Posts
Re: Seems to be a state problem
Apr 08, 2012 06:33 AM|LINK
The page load event will fire whenever you click a server side button or other control
So every time you click a button your timing thing will run in page load event, to prevent that
so that it runs only for the first time on the page load (and not on button clicks), you should
put that code inside page load, inside the if condition:
if(!Page.IsPostBack) { }