This is a migrated thread and some comments may be shown as answers.

Problems with RadNotification (not working)

2 Answers 398 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Elio
Top achievements
Rank 1
Elio asked on 26 Jul 2011, 08:14 PM
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 Answers, 1 is accepted

Sort by
0
Elio
Top achievements
Rank 1
answered on 26 Jul 2011, 08:35 PM
Deleted because was not needed.
0
Kristian
Top achievements
Rank 2
answered on 14 Oct 2011, 03:54 PM
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



Tags
Notification
Asked by
Elio
Top achievements
Rank 1
Answers by
Elio
Top achievements
Rank 1
Kristian
Top achievements
Rank 2
Share this question
or