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 / First Look


  • RadNotification for ASP.NET AJAX


    RadNotification is a a light control which can be used to display a notification message both from the server and the client. The notification is completely customizable, can be loaded on demand through a callback or WebService, can be automatically displayed and/or updated at specific intervals and supports different animation effects and at different position.

    Key features:


    • Semantic rendering - DIVs only
    • Load on Demand through callback or WebService
    • Built-in, fully customizable context menu
    • Can contain simple text, HTML content and ASP.NET controls
    • Automatically caluclates position relative to the screen
    • Automatic updates at a specified interval
    • Automatic show at a specified interval
    • Keep on mouse over
    • AutoClose Delay
    • Animation effects
    • Content scrolling
    • Advanced Skinning

Source Code

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

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <style type="text/css">
            .msg
            {
                color: Blue;
                font-size: larger;
            }
            
            html, body, form
            {
                width: 800px;
                height: 533px;
                margin: 0px;
                padding: 0px;
                overflow: hidden;
            }
            
            .toolbarWrapper
            {
                position: absolute;
                bottom: 0px;
                width: 100%;
            }
            
            .iPod
            {
                background: url(Img/rnFirstLookBgr.png) no-repeat;
                width: 800px;
                height: 553px;
                margin: auto;
            }
            
            .bottomNav
            {
                margin: 0;
                padding: 0;
                list-style: none;
                position: absolute;
                bottom: 25px;
                right: 100px;
            }
            
            .bottomNav li
            {
                float: left;
                width: 20px;
                height: 20px;
                margin-right: 7px;
            }
            
            .bottomNav li a
            {
                background-image: url(Img/rnFirstLookNavSprite.png);
                background-repeat: no-repeat;
                display: block;
                width: 20px;
                height: 20px;
            }
            
            .bottomNav .refreshGrey a
            {
                background-position: 0 0;
            }
            
            .bottomNav .refreshBlue a
            {
                background-position: -22px 0;
            }
            
            .bottomNav .refreshPrint a
            {
                background-position: -46px 0;
            }
            
            .bottomNav .refreshMail a
            {
                background-position: -77px 0;
            }
            
            .bottomNav .refreshBatteryLowest a
            {
                background-position: -105px 0;
            }
            
            .bottomNav .refreshBatteryMiddle a
            {
                background-position: -129px 0;
            }
            
            .bottomNav .refreshBatteryFull a
            {
                background-position: -149px 0;
            }
            
            .hideIcon
            {
                display: none;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadCodeBlock ID="codeBlock" runat="server">
            <script type="text/javascript">

                var notifications = new Array();

                function pageLoad() {
                    notifications[0] = $find("<%=batteryNotification.ClientID %>");
                    notifications[1] = $find("<%=mailNotification.ClientID %>");
                    notifications[2] = $find("<%=printerNotification.ClientID %>");
                    notifications[3] = $find("<%=antivirusNotification.ClientID %>");
                }

                function OnClientShowing(sender, args) {
                    //use a dynamic js property [calulateOffset] to check whether offset is already calulated -
                    //otherwise offset will always be added - e.g second notification will move up if you click fast subsequently the button which opens it
                    if (sender.calculateOffset == false) return;
                    for (var i = 0; i < notifications.length; i++) {
                        var notification = notifications[i];
                        if (sender !== notification && notification.isVisible())
                            sender.set_offsetY(sender.get_offsetY() - notification.get_height());
                    }
                    sender.calculateOffset = false;
                }

                function OnClientHidden(sender, args) {
                    sender.set_offsetY(-65);
                    sender.calculateOffset = true;
                }

                function OnClientButtonClicked(sender, args) {
                    var notificationClientID = args.get_item().get_value();
                    var notification = $find(notificationClientID);
                    if (notification) notification.show();
                }

                function OnClientUpdated(sender, args) {
                    var iconID = sender.get_id().replace("Notification", "");
                    var iconElement = $get(iconID);
                    changeIcon(iconElement, sender.get_value(), true);
                }

                function changeIcon(iconElement, newClassName, automatiShow) {

                    var notification = $find(iconElement.id + "Notification");

                    if ((iconElement.className == 'refreshGrey' || iconElement.className.indexOf('Battery') != -1) && !notification.isVisible()) {
                        notification.show();
                        return;
                    }

                    if (!newClassName) return;
                    iconElement.className = newClassName;
                    if (notification.isVisible() && !automatiShow) notification.hide();
                }
            </script>
        </telerik:RadCodeBlock>
        <asp:UpdatePanel ID="updatePnl" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div class="iPod">
                    <ul class="bottomNav">
                        <li class="refreshGrey" id="antivirus"><a href="javascript:void(0);" onclick="javascript:changeIcon(this.parentNode, 'refreshGrey');">
                        </a></li>
                        <li class="hideIcon" id="printer"><a href="javascript:void(0);" onclick="javascript:changeIcon(this.parentNode, 'hideIcon');">
                        </a></li>
                        <li class="hideIcon" id="mail"><a href="javascript:void(0);" onclick="javascript:changeIcon(this.parentNode, 'hideIcon');">
                        </a></li>
                        <li class="refreshBatteryFull" id="battery" runat="server"><a href="javascript:void(0);"
                            onclick="javascript:changeIcon(this.parentNode);"></a></li>
                    </ul>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <telerik:RadNotification ID="batteryNotification" runat="server" VisibleOnPageLoad="true"
            Width="380" Height="100" Animation="Fade" EnableRoundedCorners="true" TitleIcon="none"
            Text="Sample notification text" LoadContentOn="EveryShow" ShowInterval="6000"
            OnCallbackUpdate="OnCallbackUpdateBattery" OffsetY="-65" OffsetX="-25" OnClientShowing="OnClientShowing"
            OnClientHidden="OnClientHidden" VisibleTitlebar="false" OnClientUpdated="OnClientUpdated">
        </telerik:RadNotification>
        <telerik:RadNotification ID="mailNotification" runat="server" Width="380" Height="100"
            Animation="Fade" EnableRoundedCorners="true" VisibleTitlebar="false" ShowInterval="7000"
            OffsetY="-65" OffsetX="-25" LoadContentOn="PageLoad" OnClientShown="OnClientUpdated"
            OnClientShowing="OnClientShowing" OnClientHidden="OnClientHidden" Value="refreshMail"
            ContentIcon="Img/mail.png" Text="You have received a new message!">
        </telerik:RadNotification>
        <telerik:RadNotification ID="printerNotification" runat="server" Width="380" Height="100"
            Animation="Fade" EnableRoundedCorners="true" VisibleTitlebar="false" Text="Sample notification text"
            ShowInterval="10000" OffsetY="-65" OffsetX="-25" LoadContentOn="PageLoad" OnClientShown="OnClientUpdated"
            OnClientShowing="OnClientShowing" OnClientHidden="OnClientHidden" Value="refreshPrint"
            ContentIcon="Img/printer.png">
        </telerik:RadNotification>
        <telerik:RadNotification ID="antivirusNotification" runat="server" Width="380" Height="100"
            Animation="Fade" EnableRoundedCorners="true" VisibleTitlebar="false" Text="Sample notification text"
            ShowInterval="9000" OffsetY="-65" OffsetX="-25" LoadContentOn="PageLoad" OnClientShown="OnClientUpdated"
            OnClientShowing="OnClientShowing" OnClientHidden="OnClientHidden" Value="refreshBlue"
            ContentIcon="Img/antivirus.png" Skin="Office2007">
        </telerik:RadNotification>
        </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