当前位置:系统之家 > 技术开发教程 > 详细页面

PAUSE,PAUSE,PAUSE Function for ASP~~~

PAUSE,PAUSE,PAUSE Function for ASP~~~

更新时间:2022-05-02 文章作者:未知 信息来源:网络 阅读次数:


  '**************************************
    ' Name: ASP Pause
    ' Description:To pause ASP operations in
    '     a page for certain amount of time.
    For example: waiting for XML posts to other webpages to deliver a correct result.
    ' By: Matthew Franz
    '
    ' Inputs:Amount of time to pause
    '
    ' Side Effects:This code will change the
    '     Session.Timeout feature to ensure that y
    '     ou are allowing enough time for the paus
    '     e.
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/xq/ASP/txtCode
    '     Id.8232/lngWId.4/qx/vb/scripts/ShowCode.
    '     htm    'for details.    '**************************************
    
    Function Pause (Amount)
    'Check for Pause Amount exceeding defaul
    '     t ASP timeouts, Reset the Session.Timeou
    '     t
            If Amount > 300 Then Session.Timeout = Amount
        Start = Timer
            Do Until Start + Amount = Timer
            Loop
        Pause = Amount
    End Function
    'Page Begins Here
    AmountPausedFor = Pause (5)
    Response.Write "We paused for " & AmountPausedFor & " seconds."

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行