ÔõÑùÉèÖÃÒÑ·¢ËÍÓʼþ²»ÔÙ·¢ËÍ asp.net
¾ÍÊÇÔÚʹÓÃjmail·¢ËÍÓʼþʱ£¬Ê¹ÓõÄÊÇ×Ô¶¯É¨Ãè¹æ¶¨¼ä¸ôʱ¼ä×Ô¶¯·¢Ë͵ģ¬ÏÖÔÚÊÇÏëʵÏÖÒѾ·¢Ë͵ÄÓʼþ½«²»ÔÙ·¢ËÍ£¬¸÷λ´óϺÔõôʵÏÖ£¬ÇóÖú£¡
Ê×ÏÈÃ÷È·µÄÊÇÔÚÊý¾Ý¿â±íÖв¢Ã»Óбêʶ×Ö¶ÎÀ´±æ±ðÓʼþÊÇ·ñÒѾ·¢ËÍ¡£Èç¹ûÎÒÀ´ÉèÖÃÒ»¸öÈ«¾Ö±äÁ¿À´´æ´¢ÕâЩÒѾ·¢ËÍÓʼþµÄID£¬È»ºóÔÚÔÙ´ÎɨÃèʱÀ´±æ±ðÕâЩIDÊÇ·ñÒѾ´æÔڵķ½Ê½À´Åжϣ¬¸Ð¾õЧ¹û²»¼Ñ£¬²»ÖªµÀ»¹ÓÐûÓÐʲôÆäËû°ì·¨£¿
sqlHelper help = new sqlHelper();
if (ajaxrefresh.a == 1)
{
string sql_str = "select ids,reporter,news,times from newsnba order by ids desc";
DataSet ds = help.ExecuteDataSetSql(sql_str);
int count = ds.Tables[0].Rows.Count;
for (int i = 0; i < count; i++)
{
string ids = ds.Tables[0].Rows[i][0].ToString();
ajaxrefresh.str += ids + ",";
}
gvnews.DataSource = ds;
gvnews.DataBind();
ajaxrefresh.a++;
}
else
{
string idparam = ajaxrefresh.str.Substring(0, (ajaxrefresh.str.Length - 1));
string str = @"select ids,reporter,news,times from newsnba where ids not in ({0}) order by ids desc ";
str = string.Format(str, idparam);
DataSet dss = help.ExecuteDataSetSql(str);
gvnews.DataSource = dss;
gvnews.DataBind();
int counts=dss.Tables[0].Rows.Count;
for(int i=0;i<counts;i++)
{
ajaxrefresh.str+=dss.Tables[0].Rows[i][0].ToString();
}
Ïà¹ØÎĵµ£º
ÎÊ£ºÎªÊ²Ã´sessionÔÚÓÐЩ»úÆ÷ÉÏż¶û»á¶ªÊ§£¿
´ð£º¿ÉÄܺͻúÆ÷µÄ»·¾³ÓйØϵ£¬±ÈÈ磺·À»ðǽ»òÕßɱ¶¾Èí¼þµÈ£¬³¢ÊԹرշÀ»ðǽ¡£
ÎÊ£ºÎªÊ²Ã´µ±µ÷ÓÃsession.abandonʱ²¢Ã»Óм¤·¢session_end·½·¨£¿
´ð£ºÊ×ÏÈsession_end·½·¨Ö»Ö§³Öinproc£¨½ø³ÌÄڵģ©ÀàÐ͵Äsession¡£Æä´ÎÒª¼¤·¢session_en ......
ÔÚ ASP.NET ÍøÒ³µÄĬÈÏÄ£ÐÍÖУ¬Óû§»áÓëÒ³½»»¥£¬µ¥»÷°´Å¥»òÖ´Ðе¼Ö»ط¢µÄһЩÆäËû²Ù×÷¡£´Ëʱ½«ÖØд´½¨Ò³¼°Æä¿Ø¼þ£¬²¢ÔÚ·þÎñÆ÷ÉÏÔËÐÐÒ³´úÂ룬ÇÒа汾µÄÒ³±»³ÊÏÖµ½ä¯ÀÀÆ÷¡£µ«ÊÇ£¬ÔÚÓÐЩÇé¿öÏ£¬ÐèÒª´Ó¿Í»§¶ËÔËÐзþÎñÆ÷´úÂ룬¶ø²»Ö´Ðлط¢¡£Èç¹ûÒ³ÖеĿͻ§¶Ë½Å±¾Î¬»¤Ò»Ð©×´Ì¬ÐÅÏ¢£¨ÀýÈ磬¾Ö²¿±äÁ¿Öµ£©£¬ÄÇô·¢ËÍÒ³ºÍ»ñÈ¡Ò ......
ÔÚʹÓÃasp.net±àдwebserviceʱ£¬Ä¬ÈÏÇé¿öÏÂÊDz»Ö§³ÖsessionµÄ£¬µ«ÎÒÃÇ¿ÉÒÔ°ÑWebMethodµÄEnableSessionÑ¡ÏîÉèΪtrueÀ´ÏÔʽµÄ´ò¿ªËü£¬Çë¿´ÒÔÏÂÀý×Ó£º
1 н¨ÍøÕ¾WebSite
2 н¨web·þÎñWebService.asmx£¬Ëü¾ßÓÐÒÔÏÂÁ½¸ö·½·¨£º
[WebMethod(EnableSession = true)]
public string Login(string name)
{
  ......
ÔÚÒÔÇ°µÄASPʱºò£¬µ±ÇëÇóÒ»¸ö*.aspÒ³ÃæÎļþµÄʱºò£¬Õâ¸öHTTPÇëÇóÊ×ÏȻᱻһ¸öÃûΪinetinfo.exe½ø³ÌËù½Ø»ñ£¬Õâ¸ö½ø³Ìʵ¼ÊÉϾÍÊÇwww·þÎñ¡£½Ø»ñÖ®ºóËü»á½«Õâ¸öÇëÇóת½»¸øasp.dll½ø³Ì£¬Õâ¸ö½ø³Ì¾Í»á½âÊÍÕâ¸öaspÒ³Ã棬Ȼºó½«½âÊͺóµÄÊý¾ÝÁ÷·µ»Ø¸ø¿Í»§¶Ëä¯ÀÀÆ÷¡£ÆäʵASP.DLLÊÇÒ»¸öÒÀ¸½ÔÚIISµÄISAPIÎļþ£¬Ëü¸ºÔðÁ˶ÔÖîÈçASPÎļþ£¬A ......