Finally I have found a solution and I will explain it in detail
create a "panel control" and called it "myPanel" and put in this all controls you want to resort
<asp:Panel ID="myPanel" runat="server">
<asp:Panel ID="dock1" runat="server">this is first module</asp:Panel>
<asp:Panel ID="dock2" runat="server">this is second module</asp:Panel>
<asp:Panel ID="dock3" runat="server">this is third module</asp:Panel>
</asp:Panel>
the output will be the following
this is first module
this is second module
this is third module
so what should I do to change their order, lets see
I have created more three panels to act like a containers for the docks
my code will be like this
<asp:Panel ID="myPanel" runat="server">
<asp:Panel ID="container1" runat="server"></asp:Panel>
<asp:Panel ID="container2" runat="server"></asp:Panel>
<asp:Panel ID="container3" runat="server"></asp:Panel>
<asp:Panel ID="dock1" runat="server">this is first module</asp:Panel>
<asp:Panel ID="dock2" runat="server">this is second module</asp:Panel>
<asp:Panel ID="dock3" runat="server">this is third module</asp:Panel>
</asp:Panel>
in the code behind I have something like this
this will remove dock1 control from mypanel and put it in container3
Control myCtrl1 = myPanel.FindControl("dock1");
Control containerCtrl1 = myPanel.FindControl("container3");
myCtrl1.Visible = true;
myPanel.Controls.Remove(myCtrl1);
containerCtrl1 .Controls.Add(myCtrl1);
and you can manage these thing depending on user preferences from a database or a cookies
best regards