ÇëÎÊasp.netÖвÙ×÷cookieµÄʱºòÒªÏÈÇå¿ÕÂð£¿
Óû§µÇ¼ÎÒÊÇÓÃcookieµÄ£¬µÇ¼֮ºóÓÐÁËcookie£¬ÊÇÓÃcookie.Values.Add("Id", entity.Id.ToString())Õâ¸öID´óÓÚ0À´ÑéÖ¤Óû§ÒѾµÇ¼µÄ¡£
Í˳öµÄʱºòÊÇÓ¦¸ÃÇå¿ÕcookieµÄÖµ£¬»¹ÊÇÓ¦¸ÃÖ±½Ócookie.Values.Add("Id", entity.Id.ToString())£¬Õâ¸öIdµÈÓÚ0À´±íʾÍ˳öµÄ¡£
ÇëÎʸÃÊÇÇå¿Õ»¹ÊÇÖ±½Ó¸²¸Ç£¿£¿ÏÖÔÚÎÒ³öÏÖÁ˸öÆæ¹ÖµÄÎÊÌâ
this.Request.Cookies["adminusers"].Expires = DateTime.Now.AddHours(-1); // this.Response.Cookies.Remove("adminusers"); Response.Cookies.Add(Request.Cookies["adminusers"]);
C# code:
public void SetCurrentUsers(Users entity)
{
System.Web.HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["Users"];
if (cookie == null)
{
cookie = new System.Web.HttpCookie("Users");
}
System.Web.HttpContext.Current.Response.Cookies["Id"].Expires = DateTime.Now.AddDays(-1);
System.Web.HttpContext.Current.Response.Cookies["Username"].Expires = DateTime.Now.AddDays(-1);
cookie.Values.Add("Id", entity.Id.ToString());
cookie.Values.Add("Username", entity.Username.ToString());
System.Web.HttpContext.Curre
Ïà¹ØÎÊ´ð£º
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
ÕâÑù¿ÉÒÔ·ÖÒ³£¬µ«ÊÇÎÒÔÚºóÃæÏë¼Ó¸öÌõ¼þ
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
''' <summary>
'' ......
±¾ÈËĿǰÓöµ½Ò»¸öÄÑÌ⣬Çë¸÷λ¸ßÊÖ¡¢´óÏÀ°ï°ïæ¡£
ÎÒµ¥»÷Ò»¸ö°´Å¥Ê±Òª°ÑgridviewÖеÄÊý¾ÝÒ»¸öÒ»¸öµÄÈ¡³ö²¢°Ñ¶ÔÓ¦²ÎÊý´«µÝ¸øÇ°Ì¨µÄjs¡£
ÎÒÊÔÁ˼¸ÖÖºǫ́µ÷ǰ̨µÄ·½Ê½¶¼Ã»Óгɹ¦£¬ËùÒÔÇë´óÏÀÃǰï°ïСµÜ¡£
лл¡£
²» ......
id name gongzi
1 ÕÅÈý 1000
2 ÀîËÄ 2000
3 ÕÅÈý 2000
4 ÀîËÄ 3000
5 ÍõÎå 3000
ÎÒÓÐÕâÑùÒ»¸öÊý¾Ý¿â£¬ÏÖÔÚÎÒÒªsql²éѯµÄÊý¾ÝÊÇ ÕÅÈý£¬ÀîËÄ£¬ÍõÎåµÄ ºÏ¼ÆµÄ¹¤×Ê¡£¾ÍÊǰÑËûÃǵĺÍÇ ......
СµÜ¸ãASP.NETÒ²¿ì2ÄêÁË
µ«ÊǼܹ¹ÎÊÌâÒ»Ö±¶¼ÊÇÓõıðÈ˼ܹ¹ºÃµÄ
Ò»Ö±Ïë×Ôѧ¼Ü¹¹
ÓнéÉܺÃÊéµÄû£¿
´ó¼ÒÒ»Æð·ÖÏí¹þ
¸Ð¼¤²»¾´°¡
sf
ÏÈѧ»ù±¾µÄ°É¡¶Äã±ØÐëÖªµÀµÄ.NET¡·
ѸÀ×ÉÏ¿ÉÒÔϵġ£
Äã±Ø ......