I am trying to show alert message using RadNotification instead of regular web alert from javascript. Its not working for me not sure why. Any input is appreciated.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<telerik:RadNotification ID="RadNotificationAlert" runat="server" Position="TopCenter" Width="500"
Height="125" OnCallbackUpdate="RadNotificationAlert_CallbackUpdate" OnClientShowing="OnClientShowing"
LoadContentOn="EveryShow" AutoCloseDelay="120000" RenderMode="Lightweight" Title="Error"
Skin="MetroTouch" EnableRoundedCorners="true" VisibleOnPageLoad="false"
ShowCloseButton="false" KeepOnMouseOver="false" CssClass="timeoutNotification" ShowSound="info" Style="z-index: 300000">
<ContentTemplate>
<div class="notificationContent">
<asp:Literal ID="lblRadNotificationAlert" ClientIDMode="Static" runat="server"></asp:Literal>
<telerik:RadButton Skin="MetroTouch" ID="continueSession" runat="server" Text="Continue Your Session"
Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="RadNotificationAlertClientClose" Width="190px">
</telerik:RadButton>
</div>
</ContentTemplate>
</telerik:RadNotification>
< More code here >
</ContentTemplate>
</asp:UpdatePanel>
In area here I have written Mode code here..one of which is a submit button. on submit I do validation and if anything missing then show alert...that method I can see is getting called. Below is the javascript code:
var radAlert = $('#<%=RadNotificationAlert.ClientID %>');
$('#lblRadNotificationAlert').text('select default template');
radAlert.show();
// alert('select default template');
return false;
In the commented code, I can see that alert. When I put break point, I can see my code step through each line above. Why is the radAlert not showing then?
.notificationContent {
width: 160px;
vertical-align: bottom;
text-align: center
}
RadWindowManager should be used if you want an "alert". I was using the incorrect control!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.