嗨,请你告诉我,如何在asp.net中使用定时器控件

问题描述:

我想在asp.net网站上使用计时器控制

当页面加载计时器应该开始并且应该变为非活动状态或者弹出消息说你的预定时间结束时间

使用C#

i want to use timer control in asp.net website
when page loads timer should start and should get inactive or pop msg saying your time over on scheduled time
using C#

请参考以下链接:

定时器控件简介 [ ^ ]

如何在asp.net ajax中使用Timer [ ^ ]

解决方法:使用ASP.NET计时器控件 [ ^ ]



视频文章此处 [ ^ ]。



......还有更多此处 [ ^ ]





- Amit
Refer the links below:
Introduction to the Timer Control[^]
How to use Timer in asp.net ajax[^]
Walkthrough: Using the ASP.NET Timer Control[^]

A video article here[^].

......And many more here[^]


--Amit


<%@ Page Language="VB" %>
<script language="VB" runat="server">

    Sub Page_Load(sender as Object, e as EventArgs)
        Dim strTimePageLoaded As String

        strTimePageLoaded = Request.QueryString("time")

        If IsDate(strTimePageLoaded) Then
            lblTimeSpent.Text = "You spent " _
                & DateDiff("s", CDate(strTimePageLoaded), Now()) _
                & " seconds looking at the previous page."
        Else
            lblTimeSpent.Text = "You haven't clicked on the link below yet."
        End If

    End Sub

</script>

<html>
<head>
<title>ASP.NET Time Spent on Page Sample</title>
</head>
<body>

<p>
<asp:Label id="lblTimeSpent" runat="server" />
</p>