This is a migrated thread and some comments may be shown as answers.

Run Without Page Load Event

2 Answers 97 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 2
Danny asked on 29 Oct 2012, 06:08 PM
Is there a way to set up RadNotification to run only one method at a fixed interval, and then display only if conditions are met?

Right now it just seems to spam the page_load event, I do not want this behavior.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 30 Oct 2012, 05:01 AM
Hi Danny,

You can set VisibleOnPageLoad Property of RadNotification to false and show RadNotification whenever you want as follows.

ASPX:
<telerik:RadNotification ID="RadNotification1" runat="server" VisibleOnPageLoad="false" Title="Sample Title" Text="Simple text content" ShowCloseButton="true" >
</telerik:RadNotification>

C#:
RadNotification1.Show();

Hope this helps.

Thanks,
Princy.
0
Accepted
Marin Bratanov
Telerik team
answered on 30 Oct 2012, 09:06 AM
Hello Danny,

I have just answered your support ticket on the matter and for your convenience and for others that may have a similiar question I am pasting my reply here:

The RadNotification control supports two main ways of getting updated content - a client callback and a webservice. Client callbacks are lighter than postbacks because they do not go through the rendering stages of the page, yet they will still hit the page load event. Webservices, on the other hand, are not related to a given page and thus they will not affect it. You can see this in the following demos:
http://demos.telerik.com/aspnet-ajax/notification/examples/callback/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/notification/examples/webservice/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/notification/examples/wcfservice/defaultcs.aspx
I also think the following demo will give you a nice idea on implementing the functionality - through checking the value taken from the server:
http://demos.telerik.com/aspnet-ajax/notification/examples/updateinterval/defaultcs.aspx

All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Notification
Asked by
Danny
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or