<%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Notification.UpdateInterval.DefaultVB" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<script type="text/javascript">
function OnClientUpdated(sender, args) {
var message = "Update (check) was done!";
var newMsgs = sender.get_value();
if (newMsgs != 0) {
sender.show();
message += (newMsgs == 1) ? (" There is 1 new message!") : (" There are " + newMsgs + " new messages!");
} else {
message += " There are no new messages!";
}
logEvent(message);
}
</script>
<div class="demo-container size-medium">
<p>
The RadNotification in this demo is configured to update on every 3 seconds. The example simulates a scenario of checking for new messages
at specified interval—if there are new messages, the notification is shown. Otherwise it does not show.
</p>
</div>
<qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true"></qsf:EventLogConsole>
<telerik:RadNotification RenderMode="Lightweight" ID="RadNotification1" runat="server" LoadContentOn="TimeInterval"
Width="300" Height="150" Animation="Fade" EnableRoundedCorners="true" EnableShadow="true"
OnClientUpdated="OnClientUpdated" Title="Received messages" OffsetX="-20" OffsetY="-20"
TitleIcon="none" UpdateInterval="3000" AutoCloseDelay="1500" OnCallbackUpdate="OnCallbackUpdate">
<ContentTemplate>
<asp:Literal ID="lbl" runat="server"></asp:Literal>
</ContentTemplate>
</telerik:RadNotification>
</form>
</body>
</html>