Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Notification / Show




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)
RadNotification exposes a server method Show() - when called, the notification will show, no matter you update it or not if called with AJAX
 VisibleOnPageLoad='False'
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
RadNotification exposes can be also shown on the client by using the client-side method show()

  • Show

    RadNotification provides the following 4 basic manners to show it:

    • ShowInterval property - if set to a positive int value, the notification will automatically show after that interval of milliseconds. To stop it - set it to 0 (default value)

    • Server Show() - when called, the notiofication will show, no matter you update it or not if called with AJAX

    • VisibleOnPageLoad property - when set to true, the notification will show. If set with with AJAX request, the notification should also be updated

    • Client show() - used to show notification client-side

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Notification.ClientSideEvents.DefaultVB" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server" />
        <style type="text/css">
            .layout
            {
                font-family: "Segoe UI" ,Arial,Helvetica,sans-serif;
                font-size: 12px;
                border-collapse: collapse;
                margin: 0 auto;
                color: #000;
                text-align: left;
            }
            .layout td
            {
                padding: 6px 6px 6px 10px;
                border: 1px solid #ddd;
            }
            .layout tr
            {
                background-color: #fff;
            }
            .layout tr.dark
            {
                background-color: #efefef;
            }
            .layout tr:hover
            {
                background-color: #FDFEE3;
            }
            .layout tr.head
            {
                border: 0;
                background: transparent;
            }
            .layout tr.head:hover
            {
                background: none;
            }
            .layout tr.head td
            {
                border: 0;
            }
            .layout .rborder
            {
                border-right: 3px solid #ddd;
                padding-right: 10px;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadCodeBlock ID="block" runat="server">
            <script type="text/javascript">
                function CallClientShow()
                {
                    var notification = $find("<%= RadNotification1.ClientID %>");
                    notification.show();
                }
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadFormDecorator ID="RadFormdecorator1" runat="server" DecoratedControls="All" />
        <br />
        <br />
        <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 ID="RadNotification1" runat="server" EnableRoundedCorners="true"
                                    EnableShadow="true" Text="Sample content" Title="Sample title" Width="300" Height="100">
                                </telerik:RadNotification>
                                <asp:Button ID="Button2" runat="server" Text="Set ShowInterval" OnClick="SetInterval" Width="170px" />
                                <telerik:RadNumericTextBox ID="interval" runat="server" MinValue="0" Type="Number"
                                    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">
                            <asp:Button ID="btn1" runat="server" Text="Call Server Show()" OnClick="CallServerShow" Width="170px" />
                        </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">
                            <asp:Button ID="Button1" runat="server" Text="Toggle VisibleOnPageLoad" OnClick="ToggleVisibleOnPageLoad" Width="170px" />
                            &nbsp;<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>
                        <asp:Button ID="Button3" runat="server" Text="Call Client show()" OnClientClick="CallClientShow();return false;" Width="170px" />
                    </td>
                    <td>
                        RadNotification exposes can be also shown on the client by using the client-side
                        method show()
                    </td>
                </tr>
            </tbody>
        </table>
        <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451