AjaxÓëSessionµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET
֮ǰÓöµ½Ò»¸öÎÊÌâ¡£
ÓÚÊÇ×öÁËÒÔÏÂʵÑ飺
Ò³Ãæ¼ÓÔØºó£¬Ìá½»Ò»¸öAjaxÇëÇó(ÔݳÆÎªajax1)£¬ÇëÇóµÄÏß³ÌÔÚ·þÎñÆ÷Éϱ»Ë¯Ãß10ÃëÖÓ¡£
µã»÷Ò³ÃæÉÏÒ»¸öbutton£¬´¥·¢ÁíÒ»¸öAjaxÇëÇó(ajax2)¡£
µ±Ã»ÓÐʹÓÃsession£¬ÔÚ·þÎñÆ÷δ´¦ÀíÍêajax1µÄÇëÇóʱ£¬·þÎñÆ÷ÒÀÈ»¿ÉÒÔ´¦Àíajax2µÄÇëÇó¡£
µ«ÊÇ£¬µ±Ê¹ÓÃÁËsession£¬ÔÚ·þÎñÆ÷δ´¦ÀíÍêajax1µÄÇëÇóʱ£¬·þÎñÆ÷²»ÄÜ´¦Àíajax2µÄÇëÇó¡£±ØÐëµÈµ½ajax1´¦ÀíÍê³Éºó£¬²ÅÄÜ´¦Àíajax2µÄÇëÇó¡£
ʹÓÃsessionµÄ´úÂëºÜ¼òµ¥£¬Session.Add("user", "aaa");
Çó½ÌÅ£ÈË£¬ÈçºÎÔÚʹÓÃÁËsessionºó£¬µ±ajax1δ´¦ÀíÍê³Éʱ£¬ÒÀÈ»¿ÉÒÔ´¦Àíajax2µÄÇëÇó£¿
Õâ¸öÎÊÌ⣬ÈÃÎÒºÜÍ·´ó¡£
ajax²»ÊÇ·¢Ë͵ÄÒì²½ÇëÇóÂð£¿
Ϊʲô£¬Ê¹ÓÃÁËsessionºó£¬¾Í±ä³Éͬ²½µÄÁË£¿
Äã´úÂëÊÇÔõôдµÄ
ʵÏÖʲô¹¦ÄÜ£¬´úÂëÈçºÎ±àдµÄ.˳ÐòÖ´ÐоÍÊÇ
´úÂëÌù³öÀ´
http://www.zainanbao.com
ÎÒÏëµÄÊÇAjax1ºÍAjax2ÕâÁ½¸öÇëÇóÊDz»ÊǶ¼Óõ½ÁËsessionÄØÁË´úÂëÖУ¬ÒªÊǶ¼Óõ½ÁË£¬¿ÉÄÜsession²»ÔÊÐíͬʱ½øÐзÃÎÊ£¬ËùÒÔµ¼ÖÂÁËÄãÏÖÔÚµÄÇé¿ö¡£
..»¹Õæ²»ÖªµÀÓÐÕâÇé¿ö.
C# code:
protected void Page_Load(object sender, EventArgs e)
{
//ʹÓÃsessionµÄ´úÂë
Session.Add("user", "aaa");
switch (Request.QueryString["action"])
{
case "ajax1":
Thread.S
Ïà¹ØÎÊ´ð£º
ÎļþÉÏ´«Ê±ÔõÑùÏÔʾ½ø¶ÈÌõ ×îºÃ¸ø¸öDemo лÁË~£¡
ÓÃAjax°É£¬AjaxÓÐÀý×Ó
Óà ajaxtoolkit ÀïÃæµÄ´úÂ룬ÓÐÀý×Ó
ÒýÓÃ
ÓÃAjax°É£¬AjaxÓÐÀý×Ó
¶¥
http://topic.csdn.net/u/20091010/23/4bb5017a-ac75- ......
±È½ÏºÃµÄѧϰasp.netµÄÊéÍÆ¼öһϰɣ¬Ð»Ð»~~~
書µÄ話µÈ¸ßÈËÍÆ薦, ÎÒ認為¶àÉÏÉÏwww.asp.net對Äã幫Öúͦ´ó, ÄÇÀïÓкܶà視頻, Èç¹ûÊÇÐÂÊÖµÄ話, 視& ......
CheckBoxÑ¡Ôñ×é¼þÊÇÒ»¸ö³ÌÐòÖж¼¾³£µÄ×é¼þ¡£ÔÚ³ÌÐòÉè¼ÆÖÐʹÓõ½¸Ã×é¼þ£¬Ò»°ã¶¼²»»áֻʹÓõ½Ò»¸ö£¬ÍùÍùÊÇÒÔ¶à¸ö´ËÀà×é¼þµÄÐÎʽ³öÏֵġ£ÔÚASP.NETÒ³ÃæÖÐÈç¹ûҪʹÓõ½¶à¸öCheckBox×é¼þ£¬³ýÁËÌí¼Ó¶à¸öCheckBox×é¼þÔÚҳà ......
asp.net°ÙÍò¼¶Êý¾Ý·ÖÒ³ÓÃʲô·½·¨µÄ£¬ÊÔ¹ýaspnetpager¿ØÄ꣬³¬¹ýÊ®Íò¶¼ÂýµÃ²»ÐУ¬ºǫ́Êý¾Ý¿âÊÇsqlserver2000£¬²»ÏëÓý¨Á¢´¢´æ¹ý³ÌµÄ·½Ê½£¬Çë´ó¼ÒÖ¸µãÒ»¶þ.
²»ÏëÓý¨Á¢´¢´æ¹ý³ÌµÄ·½Ê½£¿
ÎÞÓïÁË
ÄǾÍ×Ô¼ºÆ´SQLÁË
......
ÎÒÔÚºǫ́µ÷ÓÃJavaScriptµÄʱºò£¬ËûÊÇÔÚºǫ́°ÑʼþµÄ´úÂëÖ´ÐÐÒ»´ÎºóÔÚÖ´ÐÐJavaScript·½·¨
ÓÐʲô°ì·¨ ÔÚÖ´ÐÐJavaScript·½·¨µÄʱºòͣס£¬ÔÚÖ´ÐкóÃæµÄ´úÂë
²»Ì«Ã÷°×°¡£¬ËµÇå³þµã°É
¾ÍÊÇÖ´Ðкǫ́´úÂëµÄʱºò ......