You must create a library (so it is a Custom Sever Control and not a User
Control)
public class SlideNavMenu : Control
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
}
protected override void Render(HtmlTextWriter output)
{
this.CreateChildControls();
for (int i = 0; i < this.Controls.Count; i++)
{
this.Controls.RenderControl(output);
}
}
}
--
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"Amelyan" <ba******@wi.rr.com> wrote in message
news:uY**************@TK2MSFTNGP15.phx.gbl...
I need to create web custom control that can contain any type of control as
a child (similar to asp:Panel control). However, when I try to include
children in my web control on aspx page, it says 'Content is not allowed
between the opening and closing tags for element'.
Does any one have an example of how to build this simple web custom
control?
Thanks,