Title of RadWindow

2 posts, 0 answers
  1. lupotana
    lupotana avatar
    73 posts
    Member since:
    Nov 2006

    Posted 01 Jul 2015 Link to this post

    Hi, I've a problem very stupid.
    I want use a RadWindow as "Confirm dialog" for an action.
    The problem is the text of RadWindow.
    If I set the title of RadWindow directly work very well, if I use a variable as title
    the radwindow not work (click of button don't show me the radwindow)
     

    PAGE ASPX

     <asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
     
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function confirmCallbackFn(arg) {
                    if (arg) //the user clicked OK
                    {
                        __doPostBack("<%=HiddenButton.UniqueID %>", "");
                    }
                }
            </script>
        </telerik:RadCodeBlock>
     
        <asp:Button ID="Button1" Text="call the RadConfirm" OnClick="Button1_Click" runat="server" />
        <asp:Button ID="HiddenButton" Text="" Style="display: none;" OnClick="HiddenButton_Click" runat="server" />

     

    Example A : This Work 

    protected void Button1_Click(object sender, EventArgs e)
    {          
         rwmMain.RadConfirm("Are you sure you want to perform this action?", "confirmCallbackFn", 300, 200, null, "Confirm");
    }

    Example B : This work

    protected void Button1_Click(object sender, EventArgs e)
    {          
         string message = "Are you sure you want to perform this action?";
         rwmMain.RadConfirm(message , "confirmCallbackFn", 300, 200, null, "Confirm");
    }

     

    Example c : This not work

    protected void Button1_Click(object sender, EventArgs e)
    {         
         string message = GetGlobalResourceObject("MainResources", "DeleteConfirmCompany").ToString();
         rwmMain.RadConfirm(message , "confirmCallbackFn", 300, 200, null, "Confirm");
    }

    Example D : This not work

     

    protected void Button1_Click(object sender, EventArgs e)
    {        
         string message = lblDeleteConfirm.Text;
         rwmMain.RadConfirm(message , "confirmCallbackFn", 300, 200, null, "Confirm");
    }

     

    I must translate the text.

     

  2. lupotana
    lupotana avatar
    73 posts
    Member since:
    Nov 2006

    Posted 01 Jul 2015 in reply to lupotana Link to this post

    Sorry, the problem is the text. I dont'use HttpUtility.HtmlEncode... the problem was the char(').

    Sorry. :-)

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top