Problems with RadNotification (not working)

3 posts, 0 answers
  1. Elio
    Elio avatar
    5 posts
    Member since:
    Jul 2011

    Posted 26 Jul 2011 Link to this post

    PROBLEM SOLVED
    Moderator can close this thread.

    On the website there seems to be missing an explicit explanation that After you do an CallbackUpdate you have to add a Javascript function where you do a sender.show() so your notification window could be seen on clientside.

    **********************************************************************************************************************************************************

    Hello, I started using RadNotification control today and I have encountered a problem that is really weird.

    The problem is that I am using a really simple implementation of this control using a callback method on the server, and this the notification doesn't Fire up when the event ends... in Fact it never FIRES up anytime the event ends.

    Here is my code (I used the same code provided in the Demo website) REF: http://demos.telerik.com/aspnet-ajax/notification/examples/updateinterval/defaultcs.aspx

    The only difference is that I am not using the QuickStart Library or Event Log Console.

    (CODE)

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ListaBase.UserControls.WebForm1" %>
    <%@ 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">
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
         
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <br />
        <telerik:RadNotification ID="RadNotification1" runat="server" LoadContentOn="TimeInterval"
            Width="300" Animation="Fade" EnableRoundedCorners="true" EnableShadow="true"
            Title="Received messages" OffsetX="-20" OffsetY="-20"
            TitleIcon="none" UpdateInterval="3000" AutoCloseDelay="1500" OnCallbackUpdate="OnCallbackUpdate">
            <ContentTemplate>
                <asp:Literal ID="lbl" runat="server"></asp:Literal>
            </ContentTemplate>
        </telerik:RadNotification>
         
         
        </div>
        </form>
    </body>
    </html>


    namespace ListaBase.UserControls
    {
        public partial class WebForm1 : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
     
            }
     
            protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
            {
                int newMsgs = DateTime.Now.Second % 10;
                if (newMsgs == 5 || newMsgs == 7 || newMsgs == 8 || newMsgs == 9) newMsgs = 0;
                lbl.Text = "You have " + newMsgs + " new messages!";
                RadNotification1.Value = newMsgs.ToString();
            }
        }
    }
  2. Elio
    Elio avatar
    5 posts
    Member since:
    Jul 2011

    Posted 26 Jul 2011 Link to this post

    Deleted because was not needed.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kristian
    Kristian avatar
    16 posts
    Member since:
    Jun 2010

    Posted 14 Oct 2011 Link to this post

    Nice post!
    Didn't see this anywhere else, but you can also explicitly show it a button
    http://www.telerik.com/community/forums/aspnet-ajax/notification/open-radnotification-on-button.aspx



Back to Top