asp.netÏÂCookieµÄʹÓüòµ¥Ê¾Àý
//µÚÒ»ÖÖ·½Ê½
Response.Cookie("CookieÃû³Æ").value="Öµ" //дÈë
username=Request.Cookies("CookieÃû³Æ").value// ¶ÁÈ¡
//µÚ¶þÖÖ·½Ê½
HttpCookie hcCookic = new HttpCookie("CookieÃû³Æ","Öµ");
Response.Cookies.Add(hcCookic);
C# :
//·½·¨1:
Response.Cookies["username"].Value="gjy";
Response.Cookies["username"].Expires=DateTime.Now.AddDays(1);
//·½·¨2:
System.Web.HttpCookie newcookie=new HttpCookie("username");
newcookie.Value="gjy";
newcookie.Expires=DateTime.Now.AddDays(1);
Response.AppendCookie(newcookie);
//´´½¨´øÓÐ×Ó¼üµÄcookies:
System.Web.HttpCookie newcookie=new HttpCookie("user");
newcookie.Values["username"]="gjy";
newcookie.Values["password"]="111";
newcookie.Expires=DateTime.Now.AddDays(1);
Response.AppendCookie(newcookie);
//cookiesµÄ¶ÁÈ¡:
//ÎÞ×Ó¼ü¶ÁÈ¡:
if(Request.Cookies["username"]!=null)
{
Response.Write(Server.HtmlEncode(Request.Cookies["username"].Value));
}
//ÓÐ×Ó¼ü¶ÁÈ¡:
if(Request.Cookies["user"]!=null)
{
Response.Write(Server.HtmlEncode(Request.Cookies["user"]["username"].Value));
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/carlfan/archive/2009/08/12/4440284.aspx
Ïà¹ØÎĵµ£º
1£ºGridviewÖеÄÄÚÈݵ¼³öµ½Excel¡¡
¡¡Asp.net 2.0ÖÐÐÂÔöµÄgridview¿Ø¼þ£¬ÊÇÊ®·ÖÇ¿´óµÄÊý¾Ýչʾ¿Ø¼þ£¬ÔÚÇ°ÃæµÄϵÁÐÎÄÕÂÀ·Ö±ðչʾÁËÆäÖкܶàµÄ»ù±¾Ó÷¨ºÍ¼¼ÇÉ¡£ÔÚ±¾ÎÄÖУ¬½«¼ÌÐøÌ½ÌÖÓйصļ¼ÇÉ¡£
¡¡¡¡Ò»¡¢GridviewÖеÄÄÚÈݵ¼³öµ½Excel
¡¡¡¡ÔÚÈÕ³£¹¤×÷ÖУ¬¾³£Òª½«gridviewÖеÄÄÚÈݵ¼³öµ½excel±¨±íÖÐÈ¥£¬ÔÚasp.net 2.0Ö ......
1¡¢Ê×ÏÈÏÂÔØowc11£ºowc11(http://www.svnhost.cn/Download/Detail-60.shtml)
2¡¢ÒýÓÃOWC£º´ò¿ª"½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷"Ãæ°å£¬Êó±êÓÒ¼üµ¥»÷"ÒýÓÃ"£¬Ñ¡Ôñ"Ìí¼ÓÒýÓÃ"²Ëµ¥£¬ÔÚµ¯³öµÄ"Ìí¼ÓÒýÓÃ"¶Ô»°¿òÖе¥»÷"COM"¿¨Æ¬£¬ÕÒµ½"Microsoft Office Web Components 10.0(office 2003ÊÇ11.0)"£¬µ¥»÷"Ñ¡Ôñ"ºÍ"È·¶¨"°´Å¥£¬OWC¾Í±»Ìí¼Óµ½ÁËÒý ......
Ç°Ãæ½éÉܹýÁËÈçºÎʹÓÃForms·½Ê½½øÐÐÓû§Éí·ÝÑéÖ¤£¬È»¶ø£¬ÔÚ´ó¶àÍøÕ¾Öж¼»áÓÐÒ»¸ö“Í˳ö”¹¦ÄÜ£¬ÈÃÓû§¿ÉÒÔͨ³öµÇ¼¡£ÔÚasp.netÖУ¬Í˳öµÄ·½Ê½ºÜ¼òµ¥£¬Ö»ÒªÔÚÍ˳öÒ³ÃæÖмÓÉÏ´úÂë“FormsAuthentication.SignOut()”¼´¿É¡£
Äã¿ÉÒÔʹÓÃResponse.Redirect()ÔÚÍ˳öÖ® ......
eval()·½·¨ÔÚÔËÐÐʱʹÓ÷´ÉäÖ´ÐкóÆÚ°ó¶¨¼ÆË㣬Òò´ËÓë±ê×¼µÄASP.NETÊý¾Ý°ó¶¨·½·¨bindÏà±È£¬»áµ¼ÖÂÐÔÄÜÃ÷ÏÔϽµ¡£ËüÒ»°ãÓÃÔÚ°ó¶¨Ê±ÐèÒª¸ñʽ»¯×Ö·û´®µÄÇé¿öÏ¡£¶àÊýÇé¿ö¾¡Á¿ÉÙÓô˷½·¨
Eval ·½·¨ÊǾ²Ì¬£¨Ö»¶Á£©·½·¨£¬¸Ã·½·¨²ÉÓÃÊý¾Ý×ֶεÄÖµ×÷Ϊ²ÎÊý²¢½«Æä×÷Ϊ×Ö·û´®·µ»Ø¡£Bind ·½·¨Ö§³Ö¶Á/д¹¦ÄÜ£¬¿ÉÒÔ¼ìË÷Êý¾Ý°ó¶¨¿Ø¼þµÄÖ ......