asp.netÖÐcookieµÄ´¦Àí
ÔÎÄ£ºÁõÎä|asp.netÖÐcookieµÄ´¦Àí
ʹÓÃÖз¢ÏÖÓÃRequest.Cookies.Remove()ÎÞ·¨É¾³ýcookie,googleÁËһϷ¢ÏÖÒ»°ãÊÇͨ¹ý½«¹ýÆÚʱ¼äÉèÖóɹýÈ¥µÄʱ¼äÀ´Íê³Éɾ³ýµÄ¡£Ë³±ãÕûÀíÏÂcookieµÄ²Ù×÷£º
Ò» ´´½¨
1 µ¥ÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc.Value = "value";
Response.AppendCookie(hc);
2 ¶àÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc["Value1"] = "value1";
hc["Value2"] = "value2;
Response.AppendCookie(hc);
¶þ ¶ÁÈ¡
1 µ¥ÖµµÄ¶ÁÈ¡
C#-Code:
string value = Request.Cookies["Value"].Value;
2 ¶àÖµµÄ¶ÁÈ¡
C#-Code:
string value1 = Request.Cookies["Value"]["Value1"].ToString();
string value2 = Request.Cookies["Value"]["Value2"].ToString();
Èý ɾ³ý
C#-Code:
HttpCookie hc = Request.Cookies["Value"];
hc.Expires = DateTime.Now.AddDays(-1);
//ÏÂÃæÕâ¾äÒ»¶¨Òª¼ÓÉÏ£¬·ñÔòÎÞ·¨É¾³ý
Response.AppendCookie(hc);
Ïà¹ØÎĵµ£º
Ò»¡¢Ð§¹ûͼ
1.¼òµ¥ÊôÐÔ
2.ÏÂÀ¿òÊôÐÔ
3.ÑÕÉ«ÊôÐÔ
4.°üº¬ÊôÐÔ
5.¼¯ºÏÊôÐÔ
±à¼Æ÷
6.ÈÕÆÚÊôÐÍ
¶þ¡¢³ÌÐò´úÂë
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Draw ......
Ëü»¹»áÔÚÖ¸¶¨µÄÊý¾Ý¿âÖÐÔö¼Ó¼¸¸ö´æ´¢¹ý³Ì£¬ÓÃÀ´ÈÃASP.NETÒýÇæ²éѯ׷×ÙµÄÊý¾Ý±íµÄÇé¿ö¡£
È»ºó£¬Ëü»á¸øÎÒÃÇҪ׷×ÙµÄTable¼ÓÉϼ¸¸öTrigger£¬·Ö±ð¶ÔÓ¦µ½Insert¡¢Update¡¢Delete²Ù×÷£¬Õ⼸¸öTriggerµÄÓï¾ä·Ç³£¼òµ¥£¬¾ÍÊÇ°Ñ“AspNet_SqlCacheTablesF ......
Ò»¡¢ÑéÖ¤Àà
1¡¢Êý×ÖÑéÖ¤ÄÚ
1.1 ÕûÊý
/^(-|\+)?\d+$/.test(str)
1.2 ´óÓÚ0µÄÕûÊý £¨ÓÃÓÚ´«À´µÄIDµÄÑéÖ¤)
/^\d+$/.test(str) &nb ......
ÔÚѧϰ±»Í£ÖÍÁËN¾ÃÒԺ󣬽ñÌìÖÕÓÚ϶¨¾öÐÄÒª¼ÌÐøÁË¡£¹ýÁËÌ«¾Ã¶éÂäµÄÉú»îÒ²¿ªÊ¼Ñá¾ëÁË¡£¼ÌÐø¿ªÊ¼ÎÒµÄMVCѧϰ֮·¡£ Ŀ¼»ú¹¹£º models Îļþ¼Ð£º Ä£ÐÍ×é¼þ »¹¿ÉÒÔ´æ·ÅÓйØÊý¾Ý·ÃÎʲÙ×÷µÄһЩÀà¡¢¶ÔÏóµÄ²Ù×÷µÄ¶¨ÒåµÈ¡£ Views Îļþ¼Ð£º ÊÓͼ×é¼þ¡£¿ÉÒÔ´æ·ÅµÄÎļþÀàÐÍ°üÀ¨.aspxÒ³Ã棬.ascx¿Ø¼þÒÔ¼°.mas ......
ÓÃASP.NETÓÐÒ»¶Îʱ¼äÁË£¬µ«×ܾõµÃ»¹ÊÇÒ»Ö±¸¡ÓÚ±íÃ棬¶Ô¿Ø¼þ¿ª·¢ÖªÖ®ÉõÉÙ£¬¹Ê½üÆÚ¿ªÊ¼¶ñ²¹Õâ·½ÃæµÄÄÚÈÝ¡£ÒªÅÜÌâÁË£¬»¹ÊÇÏȻعËÒ»ÏÂÓ¦¸ÃÈçºÎÉÏÊÖASP.NET£¬¸ø¸Õ¿ªÊ¼½Ó´¥ËüµÄͬ־һµãÖ¸Òý£º
1¡¢ÅªÇå³þʲôÊÇ.NET£ºËµ°×ÁËËü¾ÍÊÇÒ»Ì׿ؼþ°ü£¬Ò»°ã±»Ëµ³É¿ò¼Ü£¬ÀàËÆÓÚMFC»òÕßDELPHIµÄVCLµÈµ ......