Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI/UX Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
New to Telerik UI for ASP.NET AJAX? Download free 30-day trial
RadWindowManager's client-side API provides radalert(), radpropmt() and radconfirm() functions that can be used to replace the standard browser's dialog boxes window.alert(), window.prompt() and window.confirm(). Just like RadWindow, RadWindowManager's dialogs are completely customizable and can be used in various scenarios.
Here are the main RadWindowManager's dialogs advantages:
Differences from browser's dialogs:
The radalert and radconfirm allow to easily control the content image by passing an optional argument at the end of the method call. The argument contains relative or absolute url and if empty string is provided - the image is removed.
The radalert provides client callback support. If a client callback function is specified, the returned argument is true if the alert was closed by the OK button and null if the [X] button was used. The client callback function can also be used as a close handler.
The predefined dialogs (radalert, radconfirm and radprompt) can be now called by using the new server methods RadAlert, RadConfirm and RadPrompt of the RadWindowManager. Note, that the callback function is a client side javascript function in all cases, it doesn’t matter whether you show the dialog from the server or from the client.
<%@ Page AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Window.BrowserDialogBoxes.DefaultVB"Language="vb" %> <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head runat="server"> <title>Telerik ASP.NET Example</title> <link href="styles.css" rel="stylesheet" /> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" /> <script src="scripts.js" type="text/javascript"></script> <div class="demo-containers"> <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true"> </telerik:RadWindowManager> <telerik:RadFormDecorator RenderMode="Lightweight" ID="theFormDecorator" runat="server" DecoratedControls="Buttons" /> <div class="demo-container"> <h2>Dialogs called from client: </h2> <button style="width: 230px;" onclick="radalert('Radalert is called from the client!', 330, 180, 'Client RadAlert', alertCallBackFn, $dialogsDemo.imgUrl); return false;"> radalert from client </button><br /> <br /> <button style="width: 230px;" onclick="radconfirm('Client radconfirm: Are you sure?', confirmCallBackFn, 330, 180, null, 'Client RadConfirm', $dialogsDemo.imgUrl); return false;"> radconfirm from client </button><br /> <br /> <button style="width: 230px;" onclick="radprompt('Client RadPrompt: What is the answer of Life, Universe and Everything?', promptCallBackFn, 350, 230, null, 'Client RadPrompt', '42'); return false;"> radprompt from client </button> </div> <div class="demo-container"> <h2>Dialogs called from server: </h2> <telerik:RadAjaxPanel ID="pnl1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> <asp:Button ID="btnAlert" Width="230" runat="server" OnCommand="Btn_OnCommand" Text="radalert from server" CommandArgument="radalert"></asp:Button><br /> <br /> <asp:Button ID="btnConfirm" Width="230" runat="server" OnCommand="Btn_OnCommand" Text="radconfirm from server" CommandArgument="radconfirm"></asp:Button><br /> <br /> <asp:Button ID="btnPrompt" Width="230" runat="server" OnCommand="Btn_OnCommand" Text="radprompt from server" CommandArgument="radprompt"></asp:Button> </telerik:RadAjaxPanel> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> </div> </div> <qsf:ConfiguratorPanel runat="server"> <Views> <qsf:View runat="server"> <h4></h4> <qsf:RadioButtonList ID="choices" runat="server" Label="Manipulate radalert and radconfirm content image:"> <asp:ListItem Selected="True" Value="null" Text="Do not change (pass null or no arg)"></asp:ListItem> <asp:ListItem Value="" Text="Remove (pass empty string)"></asp:ListItem> <asp:ListItem Value="images/mail.png" Text="Document relative url (pass string)"></asp:ListItem> <asp:ListItem Value="http://demos.telerik.com/aspnet-ajax/favicon.ico" Text="Absolute url (pass string)"></asp:ListItem> </qsf:RadioButtonList> </qsf:View> </Views> </qsf:ConfiguratorPanel> </form> </body> </html>