Hi FancyKetsup,
Actually, i had used the template methord to implement the control before.But i find that, it contains some questions.For example: the following code is my control's html:
<xx:WebMultiPage id="WebMultiPage1" style="Z-INDEX: 101; LEFT: 304px; POSITION: absolute; TOP: 312px"
runat="server" height="150px" width="240px" IsGradatedColor="True" PageCount="3">
<Tab1>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
</Tab1>
<Tab3>
<asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
</Tab3>
<Tab2>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
</Tab2>
</xx:WebMultiPage>
the above code is generated in Design Time enviroment. However, do you see that...The Tab1 ..2..3., they are generated by my ITemplate(ps:i define three ITemplate like :
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
public ITemplate Tab1{
get{return _customDefinedContainer[0];}
set{_customDefinedContainer[0] = value;}
)
So, i can generate three Tab1..2..3.(i don'w know how to geneate them dynamically), ok,
the most important problem is that all of the inner webcontrol (like button). they are all in the WebMultiPage, it means that i cannot use it in aspx page directly. I must to use the method : WebMultiPage1.FindControl("Button1")..to use it ....
so, i cannot use Button1 directly in aspx , when i am writing some code...
From Panel's concept , we can drag a panel to aspx , and then we can add any webcontrol to it, and use the inner webcontrol directly..
but use ITemplate...i cannot achieve the target....
so do you have any idea????please...
have a good day..