存:
HttpCookie cookieStartTime = new HttpCookie(this.ToString() + "startTime", txtStartTime.Text);
Response.Cookies.Add(cookieStartTime);HttpCookie cookieEndTime = new HttpCookie(this.ToString() + "endTime", txtEndTime.Text);
Response.Cookies.Add(cookieEndTime);
取:
if (Request.Cookies[this.ToString() + "startTime"] != null)
{
txtStartTime.Text = Request.Cookies[this.ToString() + "startTime"].Value;
}
if (Request.Cookies[this.ToString() + "endTime"] != null)
{
txtEndTime.Text = Request.Cookies[this.ToString() + "endTime"].Value;
}