<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Notification.Show.DefaultCS" %>
<%@ 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>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadCodeBlock ID="block" runat="server">
<script type="text/javascript">
function CallClientShow() {
var notification = $find("<%=RadNotification1.ClientID %>");
notification.show();
}
</script>
</telerik:RadCodeBlock>
<div class="demo-container size-wide">
<table cellpadding="0" cellspacing="0" border="0" class="layout">
<thead>
<tr>
<td style="width: 400px; text-align: center">
<label>
<strong>Test demo</strong>
</label>
</td>
<td style="width: 400px; text-align: center">
<label>
<strong>Description</strong>
</label>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<telerik:RadNotification RenderMode="Lightweight" ID="RadNotification1" runat="server" EnableRoundedCorners="true"
EnableShadow="true" Text="Sample content" Title="Sample title" Width="300" Height="100">
</telerik:RadNotification>
<telerik:RadButton RenderMode="Lightweight" ID="RadButton1" runat="server" Text="Set ShowInterval" OnClick="SetInterval"
Width="210px" />
<telerik:RadNumericTextBox RenderMode="Lightweight" ID="interval" runat="server" MinValue="0" Type="Number" Width="140px"
NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="">
</telerik:RadNumericTextBox>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>
If the ShowInterval property is set to an int value, the notification will automatically
show after that interval of milliseconds. To stop it - set it to 0 (default value)
</td>
</tr>
<tr class="dark">
<td>
<telerik:RadAjaxPanel ID="RadAjaxpanel1" runat="server">
<telerik:RadButton RenderMode="Lightweight" ID="RadButton2" runat="server" Text="Call Server Show()" OnClick="CallServerShow"
Width="210px" />
</telerik:RadAjaxPanel>
</td>
<td>
RadNotification exposes a server method Show() - when called, the notification will
show, no matter you update it or not if called with AJAX
</td>
</tr>
<tr>
<td>
<telerik:RadAjaxPanel ID="RadAjaxpanel2" runat="server">
<telerik:RadButton RenderMode="Lightweight" ID="RadButton3" Text="Toggle VisibleOnPageLoad" OnClick="ToggleVisibleOnPageLoad"
Width="210px" runat="server" />
<asp:Label ID="lbl" runat="server" Text="VisibleOnPageLoad='False'"></asp:Label><br />
</telerik:RadAjaxPanel>
</td>
<td>
RadNotification exposes a server property VisibleOnPageLoad - when set to true,
the notification will show. If set with with AJAX request, the notification should
also be updated
</td>
</tr>
<tr class="dark">
<td>
<telerik:RadButton RenderMode="Lightweight" ID="RadButton4" runat="server" Text="Call Client show()" OnClientClicked="CallClientShow" AutoPostBack="false"
Width="210px" />
</td>
<td>
RadNotification exposes can be also shown on the client by using the client-side
method show()
</td>
</tr>
</tbody>
</table>
</div>
</form>
</body>
</html>