<% int last=0; string str = Request.Cookies["last"].Value; last = int.Parse(str); if (last != null) { Response.Write(last); HttpCookie acookie = new HttpCookie("last"); acookie.Value = (last+1).ToString(); acookie.Expires = DateTime.MaxValue; Response.Cookies.Add(acookie); } else { Response.Write("0"); HttpCookie acookie = new HttpCookie("last"); acookie.Value = "1"; acookie.Expires = DateTime.MaxValue; Response.Cookies.Add(acookie); } %>