HttpContext context = System.Web.HttpContext.Current;
if (context.Request.Cookies["G"] == null)
{
HttpCookie cookie;
Guid p = Guid.NewGuid();
string gui = p.ToString();
cookie = new HttpCookie("G", gui);
context.Response.SetCookie(cookie);
string key = ss.ToString();
SearchO Data = new SearchO();
Data.Vse = pp;
Data.Zapros = Per;
System.Web.HttpContext.Current.Cache.Add
(
key,
Data,
null,
DateTime.Now.AddMinutes(30),
TimeSpan.Zero,
System.Web.Caching.CacheItemPriority.Normal,
null
);
}
else
{
string key = context.Request.Cookies["G"].ToString();
SearchO Data = new SearchO();
Data.Vse = pp;
Data.Zapros = Per;
System.Web.HttpContext.Current.Cache.Add
(
key,
Data,
null,
DateTime.Now.AddMinutes(30),
TimeSpan.Zero,
System.Web.Caching.CacheItemPriority.Normal,
null
);
}