asp.net Ò³ÃæÏÞʱÌá½» ÈçºÎʵÏÖ - .NET¼¼Êõ / ASP.NET
1.asp.net×öµÄÒ»¸ö´ðÌâÒ³Ã棬ÈçºÎʵʱÏÞʱºó×Ô¶¯Ìá½»£¬Çë´ó¼Ò¸øµã˼·
ÏÞʱµÄʱ¼äÐÅÏ¢´æ·ÅÔÚÊý¾Ý¿âÖÐ
2.Èç¹û´ðÌâʱ¼äÉèÖõĽϳ¤£¬ÈçºÎ·½Ê½session³¬Ê±ºóÒ³ÃæÎÞЧ
лл
ÓÃjs·½·¨À´¿ØÖÆ
»Ø¸´ÄÚÈÝÌ«¶ÌÁË¡£¡£
js È¡²»µ½Êý¾Ý¿âµÄÖµ°É
Õâô¼òµ¥µÄÓÃtimer°¡ »¹²»Óõ£ÐÄSession¶ªÊ§
Ò³Ãæ³õ´Î¼ÓÔصÄʱºò°Ñʱ¼äдµ½Ç°Ì¨£¬È»ºóǰ̨µ¹¼Æʱ£¬Ê±¼äµ½µÄʱºòjsµ÷ÓÃÌá½»°´Å¥µÄclick()
ʵʱ¸úÐÂÁË
û¹ýÒ»¶Îʱ¼ä´æÒ»ÏÂÊý¾Ý¿â
·½·¨Óкܶ࣬¶ÔÓÚ´ó¼ÒµÄÒâ¼û£¬²Î¿¼£¬Ñ§Ï°¡£
Ö±½ÓÓÃsetTimeout£¬¼Çʱ¾Í¿ÉÒÔÁË
¶Áȡʱ¼ä£¬¿ªÊ¼µ¹¼Çʱ¡£¡£¡£
ASP.NETÓÐûTIMER°¡£¿²»¼ÇµÃÁË¡£¡£¡£
¿ÉÒÔÔÚ¿ªÊ¼µ¹¼Æʱʱ¼ÇÏÂϵͳʱ¼ä£¬¼ÓÉÏÏàӦʱ¼ä£¬µÃ³ö½áÊøʱ¼ä¡£¡£¡£
asp.net ajax 1.0Ì×¼þÀïÓÐtimer¿Ø¼þ
Ö±½ÓÓÃsetTimeout£¬¼Çʱ¾Í¿ÉÒÔÁË
ÓÃÏß³Ìsleep(...)
ÓÃtimer»òÕßsettimeout ¶¼¿ÉÒÔ ÒÔÇ°Ò²×ö¹ý¿¼ÊÔϵͳ µ«ÊÇÏÖÔÚ´úÂ붪ÁË ±¾ß°¡¡£¡£¡£
System.Threading.Thread.Sleep(10000);
1.½«Êý¾Ý´æ·Åµ½input type="hidden" runat="server" , ¾Í¿ÉÒÔͨ¹ýjs»ñÈ¡,²¢¼ÆËãʱ¼ä.
2.²»¶®ÄãµÄÒâ˼? µ£ÐÄsession ¶ªÊ§? ÄǾÍÊÇÓÃviewstate ±£´æÓû§Êý¾Ý.
ÎÒÓиöÎÊÌâ Èç¹û²»±£´æÔÚ·þÎñÆ÷½øÐпØÖÆ£¬Ö»ÊÇÓÃJS½øÐпØÖÆ¡
Ïà¹ØÎÊ´ð£º
ÎÒÒ»¸öÏîÄ¿£¬Óиö²åÈë²Ù×÷£¬¾ßÌåÊÇÕâÑùµÄ£º
ÎÒÓнø»õÐÅÏ¢±í¡£ÔÚ³ö»õʱѡÔñÏàÓ¦µÄ½ø»õÐÅÏ¢£¬ÊäÈëÊýÁ¿£¬Ñ¡Ôñ²¿Ãź󣬵㱣´æ°´Å¥£¬ÓÉÓÚÍøÂçÑÓʱ£¬µãÒ»ÏÂûÓз´Ó³£¬ÓÚÊÇÓû§¾ÍÓÖµãһϣ¬µ¼ÖÂÒ»´Î²åÈëÁËÁ½Ìõ¼Ç¼:
Àý£º
......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽÎļþ
<folder state="unchecked" label="È«²¿">
¡¡¡¡<folder state="unchecked" isBra ......
aspÐéÄâÖ÷»úʵÏÖα¾²Ì¬µÄ·½·¨£º
1¡¢ ÖØдurl²ÎÊý
Step1: ½¨Á¢Ç°Ì¨Îļþindex.asp£¬ÐÞ¸Äurl²ÎÊýÐÎʽ¡£ÓÉÓÚ¶ÁÈ¡Êý¾Ý¿âÖеļǼ²»ÊÇרÌâµÄÖص㣬¹ÊÖ±½Ó¸ø³ö:
<!--#include file="config.asp" -->
&l ......
±¾ÈËÊDzËÄñÒ»¸ö£¬Æ½Ê±Òª×öÉúÒ⣬µ«ÊÇÕÒÁ˺ܶàÈË×öÍøÕ¾£¬¾ù±»ÆÁË¡£×öµÃ²»Èý²»ËÄ£¬ÏÖÔÚ¾öÐÄ×Ô¼ºÀ´×öÒ»¸ö£¬ÒÑѧϰASP.NETÏà¹ØµÄÍøÒ³ÖÆ×÷֪ʶ£¬ÓÐDW»ù´¡£¬¿ÉÒÔ˵ÊÇÄ¿Ç°Ö»ÓÐÀíÂÛ֪ʶ£¬µ«ÊÇÔÚʵ¼Ê¾ßÌå²Ù×÷µÄʱºò£¬×ÜÊÇÓöµ ......