Silk skin

LinkButton - Confirm Dialog

window.alert() RadConfirm


Confirmation Result:

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This functionality is used to show confirmation pop-up/dialog asking for confirmation from the user for the next actions, whether a client-script is to be executed or a Post back to be done.

As of R2 2019, all button types except the RadRadioButtonList and RadCheckboxList come with built-in Confirmation Dialog and you can enable it simply by defining a text for the ConfirmText property.

Settings/Properties

  • ConfirmText: Enables the Confirm Dialog functionality and sets the confirmation message
  • UseRadConfirm: Switches between RadConfirm and window.confirm() dialog mode. Default value: true
Settings to customize the RadConfirm dialog window
  • Title: Sets the title of the dialog window
  • Height: Sets the dialog height
  • Width: Sets the dialog width
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • scripts.js
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.ConfirmDialog.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <script src="scripts.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Silk" MinDisplayTime="300"></telerik:RadAjaxLoadingPanel>
        <asp:Panel ID="Panel1" runat="server" CssClass="demo-container size-narrow">
        <table>
            <thead>
                <tr>
                    <th>window.alert()</th>
                    <th>RadConfirm</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton1" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                        </telerik:RadButton>
                    </td>
                    <td>
                        <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton2" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                        </telerik:RadButton>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadCheckBox ID="RadCheckBox1" runat="server" Text="RadCheckBox1" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                        </telerik:RadCheckBox>
                    </td>
                    <td>
                        <telerik:RadCheckBox ID="RadCheckBox2" runat="server" Text="RadCheckBox2" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                        </telerik:RadCheckBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadPushButton ID="RadPushButton1" runat="server" Text="RadPushButton1" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                        </telerik:RadPushButton>
                    </td>
                    <td>
                        <telerik:RadPushButton ID="RadPushButton2" runat="server" Text="RadPushButton2" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                        </telerik:RadPushButton>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadLinkButton ID="RadLinkButton1" runat="server" Text="RadLinkButton1" NavigateUrl="https://demos.telerik.com/aspnet-ajax/button" Target="_blank">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                        </telerik:RadLinkButton>
                    </td>
                    <td>
                        <telerik:RadLinkButton ID="RadLinkButton2" runat="server" Text="RadLinkButton2" NavigateUrl="https://demos.telerik.com/aspnet-ajax/button" Target="_blank">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                        </telerik:RadLinkButton>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadToggleButton runat="server" ID="RadToggleButton1" OnClientClicked="OnClientClicked">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                            <ToggleStates>
                                <telerik:ButtonToggleState Text="RadToggleButton1 - First Toggle"></telerik:ButtonToggleState>
                                <telerik:ButtonToggleState Text="RadToggleButton1 - Second Toggle"></telerik:ButtonToggleState>
                            </ToggleStates>
                        </telerik:RadToggleButton>
                    </td>
                    <td>
                        <telerik:RadToggleButton runat="server" ID="RadToggleButton2" OnClientClicked="OnClientClicked">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                            <ToggleStates>
                                <telerik:ButtonToggleState Text="RadToggleButton2 - First Toggle"></telerik:ButtonToggleState>
                                <telerik:ButtonToggleState Text="RadToggleButton2 - Second Toggle"></telerik:ButtonToggleState>
                            </ToggleStates>
                        </telerik:RadToggleButton>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadImageButton ID="RadImageButton1" runat="server" Text="RadImageButton1" Width="230px" Height="230px" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" UseRadConfirm="false" />
                            <Image Url="https://demos.telerik.com/aspnet-ajax/editor/images/top_image.png" />
                        </telerik:RadImageButton>
                    </td>
                    <td>
                        <telerik:RadImageButton ID="RadImageButton2" runat="server" Text="RadImageButton2" Width="230px" Height="230px" OnClientClicked="OnClientClicked" OnClick="Button_Click">
                            <ConfirmSettings ConfirmText="Are you sure you want to continue?" Height="200" Title="Button Confirm Dialog" Width="300" />
                            <Image Url="https://demos.telerik.com/aspnet-ajax/editor/images/top_image.png" />
                        </telerik:RadImageButton>
                    </td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2">
                        <telerik:RadCheckBox ID="RadCheckBoxPostBack" runat="server" Text="Disable AutoPostBack"></telerik:RadCheckBox>
                    </td>
                </tr>
            </tfoot>
        </table>
        <br />
        <br />
        <p>Confirmation Result:</p>
        <telerik:RadLabel ID="RadLabel1" runat="server"></telerik:RadLabel>
    </asp:Panel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?