Hi all,
I have written a small code in which i declare a static int variable and
increment its value by one each time i click on a button. actually i use the
int variable value in a particular URL so that i can browse to diff URL each
time i click the button. Hope you understand the scenario.
So here my question is how long is the value of the static variable
retained from the time i click on the button, because what i observe is when
the value of the in variable (static) goes from 1 to suppose 34 and there i
stop clicking and after may be 15 min i again click the button the value of
the int variable is again back to 1. So is there any way i can avoid this
from happening ? and what is the time limit the value of the variable is
retained.
here is the code.
static int cityID=1;
private void Button1_Click(object sender, System.EventArgs e)
{
Response.Redirect("http://chicago.craigslist.org/cgi-bin/search?areaID=" +
cityID.ToString()
+"&subAreaID=0&query=entry+level%2C+asp.net%2C+c%2 3&cat=jjj",false);
cityID++;
}
--
Never Say Die