Building Interactive User Interfaces with Microsoft ASP.NET AJAX: Using the Timer Control

Posted by: 4GuysFromRolla.com Headlines, on 18 Jun 2008 | View original | Bookmarked: 0 time(s)

Microsoft's ASP.NET AJAX framework ships with a mere five Web controls: the ScriptManager and ScriptManagerProxy; the UpdatePanel; the UpdateProgress; and the Timer. Previous installments in this article series have examined all but one control, the Timer. As we've seen from the first installment, all web pages that use the framework must have precisely one ScriptManager control on the page. The UpdatePanel control defines a region on the screen whose content is updated via partial page postbacks, and the UpdateProgress control provides visual feedback during the execution of a partial page postback. The Timer control, which is the focus of this installment, raises a postback every time a specified number of milliseconds has elapsed.

The Timer control is useful in scenarios where a portion of the screen needs to be updated every so often. For example, many financial websites display stock quotes that are refreshed periodically. Prior to AJAX, refreshing the stock quote entailed reloading the entire document, which would result in a screen flash and necessitate the browser re-downloading the entire content of the page (even though the only change that has occurred is the stock quote). Using AJAX techniques we can have the page asynchronously communicate with the server to get the latest quote every n millisconds and seamlessly update the quote on screen. The Timer control, along with the UpdatePanel, make implementing such scenarios a breeze.

This article shows how to use the Timer control to trigger a partial page postback every five seconds. It also shows how to start and stop the Timer through both server-side and client-side code. Read on to learn more!
Read More >

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Ajax | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 815 | Hits: 32

Similar Posts

  • Creating a Filtering User Interface With jQuery In a Web Forms Application: Part 1 more
  • Unit Testing - Do Repeat Yourself more
  • Update to Logging in to DotNetNuke from a Silverlight Application with RIA Authentication more
  • Telerik Announces Support for Microsoft Silverlight 3 more
  • CodeDigest.Com Article,Codes,FAQs - April,2009 more
  • Customizing ASP.NET's CreateUserWizard Control To Display a Fixed Set of Security Questions more
  • Don't be afraid of complex constraints more
  • DEVELOPER DINNER: Whats new in ASP.NET 4.0 (Web Forms, AJAX, and JQuery)? more
  • Take Charge of Your Security more
  • Periodically Updating the Screen and Web Page Title with ASP.NET AJAX more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD