RadConfirm Yes/No buttons with post back on either button

2 posts, 0 answers
  1. EJ
    EJ avatar
    39 posts
    Member since:
    Jun 2012

    Posted 16 Nov 2015 Link to this post

    I'm trying to figure out to I can show the generic radConfirm with "Yes" or "No" buttons instead of "OK" and "Cancel" buttons and have a post back occur when either "yes" or "no" occur to a different button. Right now I'm invoking radConfirm server-side using this 


    code behind c#


                  ShowConfirm("Are you sure that you want to use special option?", ConfirmPerformActionButton.UniqueID);


            private void ShowConfirm(string dialogText, string postBackUrl)
                string script = string.Format("showConfirm(\"{0}\",\"{1}\");", dialogText, postBackUrl); ;
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "KEY", script, true);


    on the ascx i have


    <script type="text/javascript">

        var confirmPostBackUrl;
        function showConfirm(dialogText, postBackUrl) {
            function f() {
                confirmPostBackUrl = postBackUrl;
                radconfirm(dialogText, confirmCallback);
        function confirmCallback(arg) {
            if (arg) {
                __doPostBack(confirmPostBackUrl, '');

    on master page i have

        <telerik:RadWindowManager ID="MasterRadWindowManager" runat="server">


    thanks for any suggestions!


  2. Marin Bratanov
    Marin Bratanov avatar
    4533 posts

    Posted 16 Nov 2015 Link to this post


    The localization features the control offers let you set the buttons text: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/accessibility-and-internationalization/localization. An alternative is to change the confirm template: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/alert,-confirm,-prompt-dialogs/how-to-change-the-dialog-templates.

    You may also find useful this article that shows how you can use a confirm dialog from the server code: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/using-radconfirm-in-server-code. The third approach shows how you can use custom buttons that can have any text/icons/postback events you want.


    Marin Bratanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top