|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp是基于web的一种编程技术,可以说是cgi的一种。它可以完成以往cgi程序的所有功能,如计数器、留言簿、公告板、聊天室等等。client|connected|responseUsingtheResponse.IsClientConnectedpropertytodeterminewhether
ornotthebrowserisstillconnectedtotheserver
WhenabrowserrequestsanASPpagefromtheWebServer,butdoes
notwaitfortheentirepagetobedownloaded,theservercontinues
toprocesstherequest,wastingvaluableCPUcycles.IfyourWeb
ServerisInternetInformationServer(IIS)4.0youcanusethe
Response.IsClientConnectedpropertytodeterminewhetherornotthe
browserisstillconnectedtotheserver.Ifitisnotconnected
totheserveryoucanstopprocessingtoconserveCPUcycles.
IfyourequestanASPpagethatcontainsthescriptbelowanduse
PerfMontomonitortheCPUcyclesontheWebserver,youwill
noticethatifyouclickstopinthebrowser,thenumberofCPU
cycleswilldecreasesoonerthaniftheloophadcontinued.
<%@LANGUAGE="VBSCRIPT"%>
<%
FunctionIsConnectedAfter(Seconds)
DimStartTime
DimPauseTime
IsConnectedAfter=True
StartTime=Now
DoWhileDateDiff("s",StartTime,Now)<Seconds
PauseTime=Now
DoWhileDateDiff("s",PauseTime,Now)<1
DoNothing
Loop
Response.Write"."
IfResponse.IsClientConnected=Falsethen
IsConnectedAfter=False
ExitFunction
EndIf
Loop
EndFunction
%>
</p>优点:简单易学、开发速度快、有很多年“历史”,能找到非常多别人做好的程序来用、配合activeX功能强大,很多php做不到的asp+activeX能做到,例如银行安全控件 |
|