I'm developing a website where I need to sort some static asp:UpdatePanels and asp:Panels including all controls inside these panels in according to database setup But I don't know how to do it :-( Is there anyone who can help me?
I have tried to setup all the panels including both Panels and UpdatePanels in an aspx file and in code behind reordered them with the following code with no success :-(
this is my aspx:
<asp:Panel runat="server" ID="panelMain">
<asp:UpdatePanel runat="server" ID="2"></asp:UpdatePanel>
<asp:Panel runat="server" ID="1"></asp:Panel>
<asp:UpdatePanel runat="server" ID="3"></asp:UpdatePanel>
</asp:Panel>
this is my c# code:
Control control2 = panelMain.FindControl("2");
Control control1 = panelMain.FindControl("1");
Control control3 = panelMain.FindControl("3");
panelMain.Controls.Clear();
panelMain.Controls.Add(control1);
panelMain.Controls.Add(control2);
panelMain.Controls.Add(control3);
The UpdatePanel must be registered in ScriptManager - and I can't sort the components - so I don't know what to do and how to register them :-(