New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientUpdateError
The OnClientUpdateError event occurs if there has been an error when the RadNotification content should be updated. An error alert which can be canceled is displayed.
The event handler receives the following parameters:
-
The RadNotification client instance that fired the event.
-
Event arguments object. Call its set_cancelErrorAlert(true) method to cancel the alert.
This code sample will throw the event every time the notification is shown, yet no error alert will be shown to the user and the notification will be empty:
ASP.NET
<telerik:RadNotification RenderMode="Lightweight" runat="server" ID="RadNotification1" Position="BottomRight"
Width="250px" Height="100px" OnClientUpdateError="OnClientUpdateError"
LoadContentOn="EveryShow" ShowInterval="5000" OnCallbackUpdate="OnCallbackUpdate">
</telerik:RadNotification>
<script type="text/javascript">
function OnClientUpdateError(sender, eventArgs)
{
eventArgs.set_cancelErrorAlert(true);
}
</script>
C#
protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
{
throw (new ApplicationException("an error occured during callback update"));
}