Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NETÖÐcookie¶Áд·½·¨½éÉÜ

Cookie (HttpCookieµÄʵÀý)ÌṩÁËÒ»ÖÖÔÚ Web Ó¦ÓóÌÐòÖд洢Óû§Ìض¨ÐÅÏ¢µÄ·½·¨¡£ÀýÈ磬µ±Óû§·ÃÎÊÄúµÄÕ¾µãʱ£¬Äú¿ÉÒÔʹÓÃCookie ´æ´¢Óû§Ê×Ñ¡Ïî»òÆäËûÐÅÏ¢¡£µ±¸ÃÓû§ÔٴηÃÎÊÄúµÄÍøվʱ£¬Ó¦ÓóÌÐò±ã¿ÉÒÔ¼ìË÷ÒÔÇ°´æ´¢µÄÐÅÏ¢¡£
ASP.NETÖеÄcookie£º´´½¨Cookie·½·¨ (1)
Response.Cookies["userName"].Value = “admin";
Response.Cookies[“userName”].Expires = DateTime.Now.AddDays(1);
//Èç¹û²»ÉèÖÃʧЧʱ¼ä,CookieÐÅÏ¢²»»áдµ½Óû§Ó²ÅÌ,ä¯ÀÀÆ÷¹Ø±Õ½«»á¶ªÆú¡£
ASP.NETÖеÄcookie£º´´½¨Cookie·½·¨ (2)
HttpCookie aCookie = new HttpCookie(“lastVisit”);
//ÉÏÒ»´Î·ÃÎÊʱ¼ä
aCookie.Value = DateTime.Now.ToString();
aCookie.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(aCookie);
ASP.NETÖеÄcookie£º·ÃÎÊCookie·½·¨(1)
if(Request.Cookies["userName"] != null)
Label1.Text = Server.HtmlEncode(Request.Cookies["userName"].Value);
·ÃÎÊCookie·½·¨(2)
if(Request.Cookies["userName"] != null) {
HttpCookie aCookie = Request.Cookies["userName"];
Label1.Text = Server.HtmlEncode(aCookie.Value);
}
ASP.NETÖеÄcookie£º´´½¨¶àÖµCookie·½·¨ (1)
Response.Cookies["userInfo"]["userName"] = “admin";
Response.Cookies["userInfo"]["lastVisit"] = DateTime.Now.ToString();
Response.Cookies["userInfo"].Expires = DateTime.Now.AddDays(1);
ASP.NETÖеÄcookie£º´´½¨¶àÖµCookie·½·¨ (2)
HttpCookie aCookie = new HttpCookie("userInfo");
aCookie.Values["userName"] = “admin";
aCookie.Values["lastVisit"] = DateTime.Now.ToString();
aCookie.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(aCookie);
ASP.NETÖеÄcookie£º¶ÁÈ¡¶àÖµCookie
HttpCookie aCookie = Request.Cookies["userInfo"];
string userName=aCookie.Values[“userName”];
string lastVisit=aCookie.Values[“lastVisit”];
ASP.NETÖеÄcookie£ºÐ޸ĺÍɾ³ýCookie
²»ÄÜÖ±½ÓÐ޸Ļòɾ³ýCookie£¬Ö»ÄÜ´´½¨Ò»¸öеÄCookie£¬·¢Ë͵½¿Í»§¶ËÒÔʵÏÖÐ޸Ļòɾ³ýCookie¡£


Ïà¹ØÎĵµ£º

ASP.NET System.Web.HttpContextÀàCurrentÊôÐÔ

1¡¢.NetµÄHTTPÇëÇó
.NETÓëASPµÄÔËÐлúÖÆÓкܴó²»Í¬.
ASPµÄÇëÇóÓëÏìÓ¦ÊÇ,ASPÒ³Ãæ±»ÇëÇó,È»ºóÖðÐнâÊÍ.ÊÇ»ùÓÚ¹ý³ÌµÄ.×î¶àÊÇ°üº¬ÁËÎļþ,ÐèÒªÏÈÒýÈëÎļþ°ÕÁË.
¶ø.Net,ÔÚÒ³Ãæ±»ÇëÇóºó,Ê×ÏÈÊǼÓÔØHTTP Module,Õâ²»ÊDZ¾ÎĵÄÖصã.È»ºóÔÙ¼ÓÔØHTTP
Handler.ÕâÒ²²»ÊDZ¾ÎĵÄÖصã.¼ÓÔصÄÕâÁ½Ïî,¶¼ÐèÒªÔÚWebconfigÎļþÖÐÅäÖÃ.´ó¼ÒÖªµÀ ......

ASP.NETÍøÂç±à³Ì³£ÓõÄ27¸öº¯Êý

ASP.NETÍøÂç±à³ÌÖг£Óõ½µÄ27¸öº¯Êý¼¯
Abs(number) È¡µÃÊýÖµµÄ¾ø¶ÔÖµ¡£
Asc(String) È¡µÃ×Ö·û´®±í´ïʽµÄµÚÒ»¸ö×Ö·ûASCII Âë¡£
Atn(number) È¡µÃÒ»¸ö½Ç¶ÈµÄ·´ÕýÇÐÖµ¡£
CallByName (
object
, procname, usecalltype,[args()]) Ö´ÐÐÒ»¸ö¶ÔÏóµÄ·½·¨¡¢É趨»ò´«»Ø¶ÔÏóµÄÊôÐÔ¡£
CBool(expression) ת»»±í´ïʽΪBoolean ......

ASP.NETÖÐÑéÖ¤¿Ø¼þµÄʹÓÃ


Ç°ÑÔ£º
    Ç°¼¸ÈÕ£¬ÎÞÄÎÓÃJSÅжϿؼþµÄÓÐЧÐÔ£¬·¢ÏÖµÄÈ·ÊÇÒ»¼þ·ÑÁ¦¡¢·ÑÉñµÄÊÂÇ飡ÌرðÊÇÕë¶ÔÓʼþ¸ñʽ¡¢ÓÊÕþ±àÂëµÈµÄ¹ØÓÚÕýÔò±í´ïʽµÄJSÑéÖ¤£¨ÆäÖÐÉæ¼°ÕýÔò±í´ïʽµÄ±È½ÏµÈ£¬½Ï·³~£©¡£Æäʵ¶ÔÓÚÕâЩ³£ÓõĿؼþÓÐЧÐÔÑéÖ¤£¬ÔÚAsp.NetÖÐÓе¥¶ÀµÄÑéÖ¤¿Ø¼þ¿É¹©Ê¹Óá£ËûÃÇ¿ÉÒÔÂú×ãÒ»°ãµÄ£¬ÖîÈç·Ç¿Õ£¬·¶Î§¡¢±È½ÏµÈµÄÑé ......

ASP.NET¸ßÊÖÀ´¿´Ï°¡

ÎÒÏë×öÒ»¸ö¶àÖ¸±ê¶¯Ì¬²éѯ£¬ÇëÎÊÄÄλÐÖµÜ×ö¹ý£¬°ï¸ö棡¾ßÌåÒªÇóÊÇ:ÎÒ¿ÉÒÔËæÒâÑ¡ÔñÊý¾Ý¿â±íÖеÄÈκÎÒ»¸ö»ò¶à¸ö×ֶΣ¬È»ºó°ÑËûÃDzéѯ³öÀ´£¡ÎÒ»á×öµ¥Ö¸±í²éѯµÄ£¬µ«ÏÖÔÚ¹¦ÄÜÒªÒªÇó¶àÖ¸±ê¶¯Ì¬²éѯ£¡»áµÄ°ï¸öæ°¡@£¡¸Ðл֮ÖÁ£¡
ÀýÈçÎÒÏë²éÊý¾Ý¿â±íÖеĠ Óû§±àºÅ ÐÕÃû »òÕßÓû§±àºÅ ÐÕÃû Ê¡·Ý  ÊÕÈë  ²¢°Ñ¶ÔÓ¦µ ......

ASP.NET+JQueryʵÏÖAJAXµÄ·ÖÒ³

  AJAXµÄ·ÖÒ³£¬ÊµÏÖ˼·ÊÇ£º
¡¡¡¡1.ÀûÓÃ$.fn.extendÔÚJQuery¿ò¼ÜÏÂÀ©Õ¹pagerÀà
¡¡¡¡2.½«»ñÈ¡¼Ç¼×ÜÊýÓëÏàÓ¦Ò³¼Ç¼µÄºǫ́·½·¨£¬Ð´Ôڼ̳Ð×ÔIHttpHandlerÀàµÄHandler.ashx.csÀ࣬µ±È»Êµ¼ÊÉÏÓÃaspx.csÎļþдºǫ́·½·¨Ò²Ã»ÎÊÌ⣬µ«ÓÉÓÚ.ashx.csÎļþÎÞÐè´¦ÀíÒ³ÃæÖî¶àʼþÒò¶øЧÂʸü¸ß¡£
¡¡¡¡3.ÔÚ³ÊÏÖÒ³ÃæÉϼÓÔØpagerÀà
¡¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ