Hi,
I have a masterpage which loads the following ascx. Within this ascx I have an action on a RadTreeNode that when clicked loads another ascx control into the RadAjaxPanel.
Clicking on the tree node loads the "CMTest.ascx" (source below) into the panel fine. I have a button on my CMTest.ascx, when pressed, the ascx disappears from the RadAjaxPanel
Can anyone see what I'm doing wrong?
Many thanks!
I have a masterpage which loads the following ascx. Within this ascx I have an action on a RadTreeNode that when clicked loads another ascx control into the RadAjaxPanel.
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadTreeView1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="PnlSiteContent" /> |
| <telerik:AjaxUpdatedControl ControlID="LitMsg" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="PnlSiteContent"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="PnlSiteContent" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <div style="float: left"> |
| <div style="float: left; border: solid 1px #ccc; padding-right:10px;"> |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" OnNodeClick="RadTreeView1_NodeClick"> |
| </telerik:RadTreeView> |
| </div> |
| <div style="float: left; border: solid 0px #ccc; width:700px; padding-left:10px;"> |
| <asp:Literal ID="LitMsg" runat="server"></asp:Literal> |
| <telerik:RadAjaxPanel ID="PnlSiteContent" runat="server"> |
| </telerik:RadAjaxPanel> |
| </div> |
| </div> |
| protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e) |
| { |
| LitMsg.Text = e.Node.Value; |
| Control cTest = LoadControl("CMTest.ascx"); |
| PnlSiteContent.Controls.Add(cTest); |
| } |
Clicking on the tree node loads the "CMTest.ascx" (source below) into the panel fine. I have a button on my CMTest.ascx, when pressed, the ascx disappears from the RadAjaxPanel
| <h1> |
| <asp:Literal ID="LitMsg" runat="server"></asp:Literal> |
| </h1> |
| <asp:TextBox ID="Tb" runat="server"></asp:TextBox><asp:Button ID="Btn" runat="server" Text="Click" OnClick="Btn_Click" /> |
| protected void Btn_Click(object sender, EventArgs e) |
| { |
| LitMsg.Text = "You entered: " + Tb.Text; |
| } |
Can anyone see what I'm doing wrong?
Many thanks!