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

ASP.NETÖÐCookieµÄÓ÷¨

CookieΪ¿Í»§¶ËÐÅÏ¢´æ·Å¶ÔÏ󣬿ÉÒÔ°ÑÓû§µÄÐÅÏ¢±£´æÔÚÓû§±¾µØ£¬²»±Ø×ÜÊÇ·ÃÎÊ·þÎñÆ÷
ÓëSession²»Í¬£¬SessionΪÓû§È«¾Ö±äÁ¿£¬¶ÔÓÚ¸ÃÓû§µÄËùÓвÙ×÷¹ý³Ì¶¼ÓÐЧ¡£
//1¡£´´½¨Cookie¶ÔÏó
 HttpCookie newCookie = new HttpCookie("User");
//2¡£CookieÖÐÌí¼ÓÐÅÏ¢ÏΪ¼üÖµ¶Ô£¬key/value
newCookie.Values.Add("Name",tbUserName.Text.Trim());
newCookie.Values.Add("Psd",tbUserPsd.Text.Trim());
//3¡£Èç¹û²»ÉèÖÃExpiresÊôÐÔ£¬¼´ÎªÁÙʱCookie£¬ä¯ÀÀÆ÷¹Ø±Õ¼´Ïûʧ
newCookie.Expires = DateTime.Now.AddDays(1);  //ÉèÖùýÆÚÌìÊýΪ1Ìì
//4¡£Ð´ÈëCookies¼¯ºÏ
 Response.AppendCookie(newCookie);
//5¡£Í¨¹ýRequest¶ÔÏó¶ÁÈ¡µÃµ½Cookies¶ÔÏó
 HttpCookie newCookie = Request.Cookies["User"];
È»ºónewCookie["Name"].values.ToString()
      newCookie["Psd"].Values.ToString() ·ÃÎʸÃCookie¶ÔÏóµÄÔªËØ
//6¡£Í¨¹ýResponse¶ÔÏóдÈë¿Í»§¶ËµÄCookie
newCookie.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(newCookie);


Ïà¹ØÎĵµ£º

¶¨ÖÆASP.Net MVCµÄ´úÂëÄ£°å

ÔÚASP.Net MVCÀàÐ͵ÄÏîÄ¿ÖÐÓÒ»÷Controller Îļþ¼Ð£¬Ñ¡ÖÐAdd=>Controller¡­ºó£¬»áÔÚн¨µÄController ÖвåÈëһЩĬÈÏ´úÂë¡£   ÔÚController µÄ¸÷¸öAction·½·¨ÖÐÓÒ»÷ Add View¡­£¬Ò²»áÔÚн¨µÄViewÖвåÈëһЩ´úÂë¡£ÔÚн¨Viewʱ²åÈëµÄ´úÂë»á¸ù¾ÝÉÏÏÂÎĺÍÄãµÄÑ¡Ôñ¶ø²»Í¬£¬ËƺõÓкܴóµÄ´úÂëÉú³É¹¦ÄÜ¡£ ÉÏÊöÁ½ÕßÉú³É´ ......

ASP.NET AJAX¿Í»§¶Ë±à³ÌÖ®Âã¨Ò»£©

ÕªÒª
      ±¾ÎĽ«Ê×ÏȽéÉÜÒ»ÏÂÎÄÕµÄд×÷±³¾°ºÍÓõ½µÄÏà¹Ø¼¼Êõ¡£È»ºó½«·Ö±ðʹÓÃÆÓËصÄAjax¼¼ÊõºÍASP.NET AJAX¿ò¼Ü·Ö±ðʵÏÖ¾­µäµÄ“Hello£¡XX”£¬Í¨¹ýÁ½¸öСÀý×Ó£¬Ê¹ÅóÓÑÃǶÔÕâ¸ö¿ò¼ÜµÄÌصãºÍ¿ò¼ÜµÄʹÓ÷½·¨ÓÐÒ»¸ö³õ²½µÄÈÏʶ¡£
Ç°ÑÔ
      ÎÒÏ룬Èç¹û½ñÌìÄ ......

asp.netµÄÒ³ÃæÖ´Ðйý³Ì½²½â

Ê×ÏÈÏÈÖØÎÂһϹØÓÚb/sģʽµÄÕû¸öÇëÇó¹ý³Ì:
¿Í»§¶Ëͨ¹ýÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÇÃÈëµØÖ·À´·¢ËÍÇëÇóµ½·þÎñÆ÷¶Ë  ->  ·þÎñÆ÷½ÓÊÕµ½ÇëÇóÖ®ºó£¬·¢¸øÏàÓ¦µÄ·þÎñÆ÷¶ËÒ³Ã棨Ҳ¾ÍÊǽű¾£©À´Ö´ÐУ¬½Å±¾²úÉú¿Í»§¶ËµÄÏìÓ¦£¬·¢Ëͻؿͻ§¶Ë   ->  ¿Í»§¶Ëä¯ÀÀÆ÷½ÓÊÕµ½·þÎñÆ÷´«»ØµÄÏìÓ¦£¬¶ÔHtml½øÐ ......

ASP.NET LINQ _1

 Ê²Ã´ÊÇLINQ?
       LINQÊÇÓïÑÔ¼¯³É²éѯ(Language Integrated Query)µÄ¼ò³Æ£¬ÊÇVisual Studio 2008 ºÍ.NET Framework 3.5 °æÖÐÒ»Ïî,Í»ÆÆÐԵĴ´Ð£¬ËüÔÚ¶ÔÏóÁìÓòºÍÊý¾ÝÁìÓòÖ®¼ä¼ÜÆðÁËÒ»×ùÇÅÁº.
       Ò»¸ö¼òµ¥LINQ²éѯ£º
    &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ