This is a migrated thread and some comments may be shown as answers.

Title of RadWindow

1 Answer 211 Views
Window
This is a migrated thread and some comments may be shown as answers.
lupotana
Top achievements
Rank 1
lupotana asked on 01 Jul 2015, 10:45 AM
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.

 

1 Answer, 1 is accepted

Sort by
0
lupotana
Top achievements
Rank 1
answered on 01 Jul 2015, 11:28 AM

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

Sorry. :-)

Tags
Window
Asked by
lupotana
Top achievements
Rank 1
Answers by
lupotana
Top achievements
Rank 1
Share this question
or