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

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


Ïà¹ØÎĵµ£º

ASP.NETÊý¾Ý¿â·ÃÎÊÀà

±È½ÏºÃµÄÊý¾Ý¿â·ÃÎÊÀà
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data;
using System.Configuration;
namespace PublicClass
{
    /// <summary>    ///
  &n ......

asp.netÊý¾Ý¿Ø¼þ Êý¾Ý°ó¶¨¿Ø¼þ±È½Ï


Êý¾Ý°ó¶¨¿Ø¼þ±È½Ï
(Reapter\DataList\GridView\DatailsView\FormView):
1.²åÈ빦ÄÜ·½Ãæ:
DetailsViewºÍFormView¾ßÓвåÈ빦ÄÜ,ÆäËü¿Ø¼þûÓÐ
2.Ä£°å
DataList\FormView\RepeaterÈýÖÖ±ØÐë±à¼­Ä£°å,¶ø
GridViewºÍDetailsViewÖ»ÓÐÔÚ½«ÁÐת»»³ÉÄ£°åÁÐÒÔºó²Å»á³öÏÖ¸÷ÖÖÄ£°å.
3.×Ô¶¯·ÖÒ³¹¦ÄÜ
GridView ,DetailsViewºÍForm ......

asp.net GridviewÖеÄÄÚÈݵ¼³öµ½Excel

1£ºGridviewÖеÄÄÚÈݵ¼³öµ½Excel¡¡
¡¡Asp.net 2.0ÖÐÐÂÔöµÄgridview¿Ø¼þ£¬ÊÇÊ®·ÖÇ¿´óµÄÊý¾Ýչʾ¿Ø¼þ£¬ÔÚÇ°ÃæµÄϵÁÐÎÄÕÂÀ·Ö±ðչʾÁËÆäÖкܶàµÄ»ù±¾Ó÷¨ºÍ¼¼ÇÉ¡£ÔÚ±¾ÎÄÖУ¬½«¼ÌÐøÌ½ÌÖÓйصļ¼ÇÉ¡£
¡¡¡¡Ò»¡¢GridviewÖеÄÄÚÈݵ¼³öµ½Excel
¡¡¡¡ÔÚÈÕ³£¹¤×÷ÖУ¬¾­³£Òª½«gridviewÖеÄÄÚÈݵ¼³öµ½excel±¨±íÖÐÈ¥£¬ÔÚasp.net 2.0Ö ......

asp.netÖеĴ°ÌåÉí·ÝÑéÖ¤£¨ÍêÕûƪ֮Î壺Í˳öµÇ¼£©

    Ç°Ãæ½éÉܹýÁËÈçºÎʹÓÃForms·½Ê½½øÐÐÓû§Éí·ÝÑéÖ¤£¬È»¶ø£¬ÔÚ´ó¶àÍøÕ¾Öж¼»áÓÐÒ»¸ö“Í˳ö”¹¦ÄÜ£¬ÈÃÓû§¿ÉÒÔͨ³öµÇ¼¡£ÔÚasp.netÖУ¬Í˳öµÄ·½Ê½ºÜ¼òµ¥£¬Ö»ÒªÔÚÍ˳öÒ³ÃæÖмÓÉÏ´úÂë“FormsAuthentication.SignOut()”¼´¿É¡£
    Äã¿ÉÒÔʹÓÃResponse.Redirect()ÔÚÍ˳öÖ® ......

Asp.netÖÐDataBinder.EvalÓ÷¨µÄ×ܽá

eval()·½·¨ÔÚÔËÐÐʱʹÓ÷´ÉäÖ´ÐкóÆÚ°ó¶¨¼ÆË㣬Òò´ËÓë±ê×¼µÄASP.NETÊý¾Ý°ó¶¨·½·¨bindÏà±È£¬»áµ¼ÖÂÐÔÄÜÃ÷ÏÔϽµ¡£ËüÒ»°ãÓÃÔÚ°ó¶¨Ê±ÐèÒª¸ñʽ»¯×Ö·û´®µÄÇé¿öÏ¡£¶àÊýÇé¿ö¾¡Á¿ÉÙÓô˷½·¨
Eval ·½·¨ÊǾ²Ì¬£¨Ö»¶Á£©·½·¨£¬¸Ã·½·¨²ÉÓÃÊý¾Ý×ֶεÄÖµ×÷Ϊ²ÎÊý²¢½«Æä×÷Ϊ×Ö·û´®·µ»Ø¡£Bind ·½·¨Ö§³Ö¶Á/д¹¦ÄÜ£¬¿ÉÒÔ¼ìË÷Êý¾Ý°ó¶¨¿Ø¼þµÄÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ