¥H¤U¬O¤Þ¥Î¤ù¬q¡G
string key = TextBox1.Text; //¥Î¤á¦W¤å¥»®Ø³]¬°cacheÃöÁä¦r
string uer = Convert.ToString(Cache[key]); //Ū¨úcache¤¤¥Î¤á¬ÛÀ³ªºÈ
//§PÂ_cache¤¤¬O§_¦³¥Î¤áªº¸ê°T¡A¦pªG¨S¦³¬ÛÃöªºÈ¡A»¡©ú¥Î¤á¥¼µn³°
if (uer == null || uer == String.Empty)
{
¡@//©w¸qcache¹L´Á®É¶¡
¡@TimeSpan SessTimeout = new TimeSpan(0, 0, System.Web.HttpContext.Current.Session.Timeout, 0, 0);
¡@//²Ä¤@¦¸µn³°ªº®ÉÔ´¡¤J¤@ӥΤá¬ÛÃöªºcacheÈ¡A
¡@HttpContext.Current.Cache.Insert(key, key, null, DateTime.MaxValue, SessTimeout, System.Web.Caching.CacheItemPriority.NotRemovable, null);
¡@Session["ADMINID"] = TextBox1.Text;
¡@Response.Redirect("main.ASPx");
}
else
{
¡@//«½Æµn³°
¡@Response.Write("");
}