| Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
| Author | Forum: PowerWEB LiveControls for ASP.NET Topic: LiveTimer and Custom Control Issues |
| NaineshUK From: London, United Kingdom Posts: 3 Member Since: 07/13/06 |
posted July 18, 2006 6:15 AM Hi there, i am quite new to using the LiveTimer (v 1.4) and ASP.Net 2.0 and have come across an issue. I have a Custom Web Control that is as follows: <table style="width:200px;"> <tr> <td> <cc1:LiveLabel CssClass="Product" ID="lblName" runat="server" DataPersistenceType="ViewState"></cc1:LiveLabel></td> </tr> <tr> <td> <cc1:LiveLinkButton CssClass="Link" ID="btnLink" runat="server">product detail</cc1:LiveLinkButton></td> </tr> <tr> <td> <cc1:LiveLabel CssClass="Price" ID="lblPrice" runat="server"></cc1:LiveLabel></td> </tr> <tr> <td> <cc1:LiveButton CssClass="BuyButton" ID="btnBuy" runat="server" Text="Login / Register" /></td> </tr> </table> I dynamically load this control 5 times to a web page and populate the each control with values from a database. This is done on the Page_Init I have a livetimer on the web page that will poll a database and will update the values in each of the controls as required. Here is the code for the live timer on the webpage. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'on load If Not Page.IsPostBack Then 'start the timer once the page loads InitialiseTimer() LiveTimer1.Interval = 300 LiveTimer1.Start() End If End Sub Private Sub InitialiseTimer() lblTimeValue.Text = "Time remaining" StartTime = Date.Now.ToShortDateString & " 9:00:00" EndTime = Date.Now.ToShortDateString & " 12:00:00" End Sub Question 1: Everytime i start the timer on the webpage it removes all the loaded values from each of the controls and i get this error: The server viewstate cache has timed out. The application was unable to successfully recover state. To address this exception, modify your web.config to use client-side viewstate caching, or to extend the server cache timeout value. Question 2: How do i maintain the values that are inside the Custom Control when the timer is running? Any help here would be much appreciated. |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted July 21, 2006 11:53 AM It looks like the dll you are using is old (the DataPersistenceType property has been deprecated for state-caching using an HttpModule). Get the latest update at http://www.dart.com/support/updatecenter.asp and try your test again. |
| Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|