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.