Currently working on a project that requires what is effectively being called a "Notification Queue" which is embedded into the Site.Master page in a ASP.NET 4.5 C# environment with Visual Studio 2013 SP 2.
The Notification Queue is a Web User Control which has 8 RadNotification controls, currently, 7 of the controls are ennumerated RadNotification1 to RadNotification7 for their ID, the 8th RadNotification control has a RadButton, an ASP ImageButton and ASP Label.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="telNotificationQueue.ascx.cs" Inherits="poetwebapp.Controls.telNotificationQueue" %>
<
script
type
=
"text/javascript"
>
function jsAcknowledge(s, e) {
s.set_autoPostBack(true);
s.set_commandArgument("All");
debugger;
__doPostBack('<%=butAcknowledgeAll.UniqueID%>', 'OnClick');
}
</
script
>
<
telerik:RadNotification
ID
=
"radNotification1"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification2"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification3"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification4"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification5"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification6"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"radNotification7"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"130"
Width
=
"330"
ShowCloseButton
=
"true"
ShowTitleMenu
=
"false"
Skin
=
"Web20"
ContentScrolling
=
"Y"
VisibleTitlebar
=
"true"
>
<
ContentTemplate
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
telerik:RadNotification
ID
=
"RadNotificationQueueCommands"
runat
=
"server"
AutoCloseDelay
=
"0"
Height
=
"35"
Width
=
"330"
ShowCloseButton
=
"false"
LoadContentOn
=
"TimeInterval"
UpdateInterval
=
"120"
VisibleOnPageLoad
=
"false"
VisibleTitlebar
=
"false"
>
<
ContentTemplate
>
<
div
style
=
"padding-top:5px; padding-bottom:5px; padding-left:5px;"
>
<
telerik:RadButton
ID
=
"butAcknowledgeAll"
runat
=
"server"
Text
=
"Acknowledge All"
AutoPostBack
=
"true"
OnClientClicked
=
"jsAcknowledge"
OnClick
=
"RadButton1_Click"
OnCommand
=
"butAcknowledgeAll_Command"
UseSubmitBehavior
=
"true"
CommandName
=
"AcknowledgeAll"
CausesValidation
=
"false"
>
</
telerik:RadButton
>
<
asp:ImageButton
ID
=
"ibtRefreshList"
runat
=
"server"
ImageUrl
=
"~/Images/refresh_icon.png"
Style
=
"padding-top:3px;"
/>
<
asp:Label
ID
=
"lblWaitingNotifications"
runat
=
"server"
Text
=
"# Notifications"
></
asp:Label
>
</
div
>
</
ContentTemplate
>
</
telerik:RadNotification
>
The RadButton OnClick (Server-side) Event is not being fired by the current code. The OnClientClicked event does run the jsAcknowledge function but the stop points within Visual Studio 2013 SP 2 are not being triggered - these stop points are:
protected void RadButton1_Click(object sender, EventArgs e) { fnProcessForm(); }
protected void butAcknowledgeAll_Command(object sender, CommandEventArgs e) { fnProcessForm(); }
So, this would indicate that the OnClick event is not being triggered and this event does need to be able to fire since the server-side code will contain an SQL UPDATE command /transaction. Recommendations?
The fnProcessForm() function displays the appropriate number of messages on the screen for the user and updates the Label to indicate the overall number of waiting messages for the user. The attached file displays an example of the layout.