asp.net ÐÔÄÜ
http://blog.csdn.net/chengking/archive/2005/10/27/518079.aspx
(Ò»).Ñ¡Ôñ»á»°×´Ì¬´æ´¢·½Ê½
ÔÚWebconfigÎļþÅäÖÃ:
<sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>
Asp.netÓÐÈýÖÖ·½Ê½´æ´¢»á»°×´Ì¬ÐÅÏ¢:
1. ´æ´¢ÔÚ½ø³ÌÖÐ: ÊôÐÔmode = InProc
Ìص㣺 ¾ßÓÐ×î¼ÑµÄÐÔÄÜ£¬ËÙ¶È×î¿ì,µ«²»ÄÜ¿ç¶ą̀·þÎñÆ÷´æ´¢¹²Ïí.
2. ´æ´¢ÔÚ״̬·þÎñÆ÷ÖÐ: ÊôÐÔmode = "StateServer"
Ìصã: µ±ÐèÒª¿ç·þÎñÆ÷ά»¤Óû§»á»°ÐÅϢʱ£¬Ê¹Óô˷½·¨¡£
µ«ÊÇÐÅÏ¢´æ´¢ÔÚ״̬·þÎñÆ÷ÉÏ£¬Ò»µ©×´Ì¬·þÎñÆ÷³öÏÖ¹ÊÕÏ£¬ÐÅÏ¢½«¶ªÊ§
3. ´æ´¢ÔÚSql ServerÖÐ: ÊôÐÔmode="SqlServer"
Ìصã: ¹¤×÷¸ºÔØ»á±ä´ó£¬µ«ÐÅÏ¢²»»á¶ªÊ§.
²¹³äÒ»µã£º
I. ÓÉÓÚijЩҳÃæ²»ÐèÒª»á»°×´Ì¬£¬Ôò¿ÉÒÔ½«»á»°×´Ì¬½ûÓÃ:
´úÂëÈçÏ£º <%@ Page EnableSessionState="false" %>
II.Èç¹ûÒ³ÃæÐèÒª·ÃÎʻỰ±äÁ¿µ«²»ÔÊÐíÐÞ¸ÄËüÃÇ£¬¿ÉÒÔÉèÖÃÒ³Ãæ»á»°×´Ì¬ÎªÖ»¶Á:
´úÂëÈçÏ£º <%@ Page EnableSessionState="false" %>
ʹÓÃʱ¿ÉÒÔ¸ù¾Ý¾ßÌåÇé¿öÑ¡ÔñijÖÖ·½Ê½
(¶þ).ʹÓÃPage.IsPostBack
Page.IsPostBack±íʾÊÇ·ñÊÇ´Ó¿Í»§¶Ë·µ»ØµÄ. ³õ´ÎÔËÐÐʱ£¬²»ÊÇ´Ó¿Í»§¶Ë·µ»Ø£¬ËüµÄÖµ
Ϊfalse,µ±´¥·¢Ò³ÃæÉϵÄʼþ»òË¢ÐÂÒ³Ãæʱ£¬Page.IsPostBackÓÉÓÚÊǻط¢µÄ£¬Öµ±äΪtrue;
&n
Ïà¹ØÎĵµ£º
<HTML><HEAD>
<TITLE>ÍøÒ³ÌØЧ¹ÛÖ¹|JsCode.CN|---Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ</TITLE>
<SCRIPT language=JavaScript>
<!--
/**//*
** ==================================================================================================
**&nbs ......
asp.net ѧϰ×ÊÔ´
¹ØÓÚ´ËÖ÷Ìâ½öÓÐ 1 ¸öÌû×Ó - Ê÷ʽä¯ÀÀ
astin...@gmail.com
9ÔÂ26ÈÕ ÉÏÎç12ʱ41·Ö ÏÔʾѡÏî
·¢¼þÈË£º astin...@gmail.com - ²éÕÒ´Ë×÷ÕßµÄÌû×Ó
ÈÕÆÚ£ºSun, 25 Sep 2005 09:41:54 -0700
µ±µØʱ¼ä£º2005Äê9ÔÂ26ÈÕ(ÐÇÆÚÒ») ÉÏÎç12ʱ41·Ö
Ö÷Ì⣺asp.net ѧϰ×ÊÔ´
´ð¸´×÷Õ ......
ÔÚASP.NETÖÐ,ÎÒÃÇ¿ÉÒÔÓÃÏÂÃæµÄ·½·¨ÊµÏÖ´ÓÊý¾Ý¿âÖжÁȡͼƬ²¢ÏÔʾÔÚÒ³ÃæÉÏ,·½·¨ÈçÏÂ:
SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["ConnStr"]);
String sql="SELECT image from append where id='" + strID + "'";
&n ......