I have 2 user control. 1 User control inside other user control
User Control 2
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Uc2.ascx.cs" Inherits="Wrapsons.WebApp.UserControls.UcSeason" %>
<asp:Button ID="BtnTest" runat="server" OnClick="BtnTest_OnClick" Text="Test"/>
User Control 1
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Uc1.ascx.cs" Inherits="Wrapsons.WebApp.UserControls.UcSeason" %>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<telerik:RadWindow ID="RadWindow" runat="server">
<ContentTemplate>
<uc1:Uc2 ID="Uc2" runat="server" />
</ContentTemplate>
</telerik:RadWindow>
</ContentTemplate>
</asp:UpdatePanel>
In Test.aspx Uc1 is used
When I click on Test Button, RadWindow is closed.
Is there any way to avoid the postback?
Thank you in advance!
Here is how to use AJAX properly with the ContentTemplate: http://www.telerik.com/help/aspnet-ajax/window-ajaxifying.html
and here is your snippet, modified:
Also, go through this one if you need to open/close the window from your server code: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html