Notification - Setting Content

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

RadNotification can contain simple and rich content as explained 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, whether 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"

  • DefaultCS.aspx
    • DefaultCS.aspx
    • RichContent.aspx
    • SimpleContent.aspx
  • RichContent.aspx.cs
    • RichContent.aspx.cs
    • SimpleContent.aspx.cs
  • StyleSheetRich.css
    • StyleSheetRich.css
    • StyleSheetSimple.css
<%@ Page Language="C#"  %>

<%@ 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">
    <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" />
    <div class="demo-container no-bg" style="width: 880px;">
        <table style="width: 100%;">
            <tbody>
                <tr>
                    <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>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?