Refreshing On Interval Clears Content

2 posts, 0 answers
  1. Mirek
    Mirek avatar
    2 posts
    Member since:
    Sep 2015

    Posted 22 Jul 2016 Link to this post

    I have a simple update on interval application (pretty much same as this demo: ).


    The problem is if you set the updateinterval for a length of time less than the autoclosedelay it blanks out the popup (clears the content of the literal).  In other words if I check for new messages while a message is already visible, even if there are no new messages, the page posts back and my message is empty.

    Is there some easy way to get around this or do I have to do something like store the value in a session/page variable etc.?

  2. Marin Bratanov
    Marin Bratanov avatar
    4012 posts

    Posted 25 Jul 2016 Link to this post

    Hello Mirek,

    The demo shows such a way—intercepting the OnClientUpdated event, checking for the information the server returns through the Value property and making a decision based on that. For example, you can call the hide() method of the notification if there is no new data.

    Otherwise, as long as you return some text, the notification will not be empty. Here is a small example that illustrates this:

    <telerik:RadNotification ID="RadNotification1" runat="server" OnCallbackUpdate="RadNotification1_CallbackUpdate" AutoCloseDelay="0" VisibleOnPageLoad="true" LoadContentOn="TimeInterval" UpdateInterval="2000" Width="200" Height="100"></telerik:RadNotification>
    protected void RadNotification1_CallbackUpdate(object sender, RadNotificationEventArgs e)
        (sender as RadNotification).Text = DateTime.Now.ToString();


    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top