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 / Setting content


  • Setting content



    RadNotification can contain simple and rich content as exaplined below:

    • Simple content - you can set simple content to the RadNotification by assigning its Text and ContentIcon properties. You can do this directly in markup or dynamically on the server as the demo shows.
    • Rich content - you can set rich custom content by putting it inside a ContentTemplate. You can do this directly in markup or dynamically on the server as the demo shows. Note, that this demo only shows how to do so, and controls are not recreated on postback as they should be in every real life ASP.NET dynamic controls scenario, no matter you use RadNotification or not.
    • Titlebar content - you can set title and title icon through the Title and TitleIcon properties in both the modes.


    Note: For the icons(both title and content one) you can set either the url to the desired image as shown in this demo or you can use one of the predefined icons as shown in the configurator demo.

    Note: To remove a certain icon, you should set it either to an empty string or "none", e.g TitleIcon="none"

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb"%>

    <%@ 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.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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
            {
            }
            .layout tr
            {
                background-color: #fff;
            }
            
            .layout .rborder
            {
                border-right: 3px solid #ddd;
                padding-right: 10px;
            }
            .content, .content TD
            {
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" ShowSkinChooser="false" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadFormDecorator ID="RadFormdecorator1" runat="server" DecoratedControls="All" />
        <table cellpadding="0" cellspacing="0" border="0" class="layout" style="width: 100%;">
            <tbody>
                <tr class="content">
                    <td style="height: 290px;">
                        <iframe id="simpleContent" style="width: 100%; height: 100%;" frameborder="0" src="SimpleContent.aspx">
                        </iframe>
                    </td>
                </tr>
                <tr>
                    <td style="height: 290px;">
                        <iframe id="richContent" style="width: 100%; height: 100%;" frameborder="0" src="RichContent.aspx">
                        </iframe>
                    </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