Hi,
Take a look at this scenario: there's a page (inherited from Master Page) containing a user control. This control contains a RadWindow and a button to show the window.
Master Page:
Page:
Control.aspx:
Control.cs
When Button2 is clicked, the window closes and both of the labels change. How to fix this problem keeping code on Master Page unchanged?
Thanks in advance.
Take a look at this scenario: there's a page (inherited from Master Page) containing a user control. This control contains a RadWindow and a button to show the window.
Master Page:
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<%-- This shouldn't be modified --%>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
UpdatePanelsRenderMode
=
"Inline"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ContentPlaceHolder1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"ContentPlaceHolder1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:ContentPlaceHolder
ID
=
"ContentPlaceHolder1"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
</
form
>
</
body
>
Page:
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
runat
=
"server"
>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"WebUserControl1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"WebUserControl1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
uc1:WebUserControl1
runat
=
"server"
ID
=
"WebUserControl1"
/>
</
asp:Content
>
Control.aspx:
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Button2"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"Label2"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadWindow1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function f()
{
var clientWin = $find('<%= RadWindow1.ClientID %>');
clientWin.show();
}
</
script
>
</
telerik:RadScriptBlock
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"ShowWindow"
OnClientClick
=
"f(); return false;"
/>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"Label"
></
asp:Label
>
<
telerik:RadWindow
ID
=
"RadWindow1"
ReloadOnShow
=
"true"
runat
=
"server"
OnClientClose
=
"OnClientclose"
>
<
ContentTemplate
>
<
asp:Button
ID
=
"Button2"
runat
=
"server"
Text
=
"Change labels"
OnClick
=
"Button2_Click"
/>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
Text
=
"Label"
></
asp:Label
>
</
ContentTemplate
>
</
telerik:RadWindow
>
protected
void
Button2_Click(
object
sender, EventArgs e)
{
Label2.Text =
"222"
;
Label1.Text =
"111"
;
}
When Button2 is clicked, the window closes and both of the labels change. How to fix this problem keeping code on Master Page unchanged?
Thanks in advance.