Click here to Skip to main content
12,360,334 members (56,149 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads

Tagged as

Stats

36.8K views
1.2K downloads
38 bookmarked
Posted

Web Timer Control

, 7 Oct 2008 GPL3
Provides a mechanism for executing a method at specified intervals
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManualStart.aspx.cs" Inherits="ManualStart"  Title="Manual Start" %>
<%@ Register Namespace="CodeControls" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <h2>Manual Start</h2>
    <div>    
    <table style="color:Green;font-weight:bold">
    <tr>
    <td colspan="2" style="text-decoration:underline">Timer Settings</td>    
    </tr>
    <tr>
    <td align="right"> AutoStart:</td><td><asp:Label ID="lbAutoStart" runat="server"/></td>    
    </tr>
    
     <tr>
    <td align="right"> PostBack On TimeOut:</td><td><asp:Label ID="lbPostBack" runat="server"/></td>    
    </tr>
    
    <tr>
    <td align="right"> Disable Mouse Right Click: </td><td><asp:Label ID="lbMouseClick" runat="server"/></td>    
    </tr>
    
    <tr>
     <td align="right"> Sync Clock With Server: </td><td><asp:Label ID="lbSyncTimer" runat="server"/></td>    
    </tr>
    </table>
    
    <br />
    <br />
     <cc:Timer ID="Timer1" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="48px" ForeColor="#FF8000"
     Interval="5" IsAutoStart="False" DisableRightClick="False" DoPostBackOnTimeOut="False" ServerSideTimeSynchronize="True" TimeOut="24" 
     OnIntervalReached="Timer1_IntervalReached" OnTimeOutOccurred="Timer1_TimeOutOccurred"
     ></cc:Timer><br />
        <br />
        &nbsp;<br />
        <br />
        <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Start Timer" />
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Create PostBack" /></div>
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Prem Rajadattan
United States United States

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 7 Oct 2008
Article Copyright 2008 by Prem Rajadattan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid