Question Variable value remain same while loading page

suresh09

Member
Joined
Apr 2, 2009
Messages
10
Programming Experience
Beginner
im using my logic in the page load fn. i have an variable id. while loading page the variable id want to increment by 1 and value remain same...initially the id hav 0 while calling the page load 4 times this value have to be 4.....pls help me with some code....thanks in advance
 
One thing you have to realize is that whenever the page comes back to the server, you need to re-grab whatever data you need from the page, so to have a page load counter like that, you need to store the value somewhere on the page itself, a hidden text field would work fine for ya.
 
Back
Top