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½øÐпØÖÆ¡
Ïà¹ØÎÊ´ð£º
function CheckOpwd(){//ÑéÖ¤Óû§Ãû
var pwd=document.all.txtOpwd;
var div1=document.getElementById("divPwd");
if (pwd.value=="")
{
......
µ÷ÕûÁËÕâÀÄÇÀï³öÎÊÌâ¡£
ÓÐûÓÐʲôºÃµÄ·½·¨£¬Ïñµ÷Õû¶Ô»°¿òÒ»Ñù£¿£¿£¿£¿
ÕÒ¸öרÃÅ×öÒ³ÃæµÄ
ÔÚdreamweaverÀïµ÷¡£¡£¡£Ò²¿ÉÒÔÖ±½Ó¿ØÖÆHTML´úÂë
ȷʵʹ¿à ¸ÐͬÉíÊÜѽ
¹þ¹þ ¼á¾ö·¹ý¡£
ÓÃDW°É£¬VS¸ãÉè¼Æ ......
ÔÚaspÀïÔõôµ÷ÓÃjavaдµÄwebservice·½·¨£¬Óкܶ෽·¨
- <message name="RtPnrIn">
<part name="bstrPnrNO" type="s:string" />
<part name ......
<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......
aspÐéÄâÖ÷»úʵÏÖα¾²Ì¬µÄ·½·¨£º
1¡¢ ÖØдurl²ÎÊý
Step1: ½¨Á¢Ç°Ì¨Îļþindex.asp£¬ÐÞ¸Äurl²ÎÊýÐÎʽ¡£ÓÉÓÚ¶ÁÈ¡Êý¾Ý¿âÖеļǼ²»ÊÇרÌâµÄÖص㣬¹ÊÖ±½Ó¸ø³ö:
<!--#include file="config.asp" -->
&l ......