Hi,
I think it would be better to do that in client-side JavaScript code,
provided there are no browser limitations preventing you from using
JavaScript and DHTML. You should re-post your question in the
microsoft.public.dotnet.framework.aspnet newsgroup otherwise.
Briefly, you should expose an event from the Box1 control which is raised
when the button is pressed (you will most likely raise it from a
Button_Click handler). Then, the parent control handles the exposed event
upon postback and adds necessary controls to its Controls collection in the
event handler.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Wong chian" <an*******@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,
I have this easy piece of code:
public class Box1:System.web.ui.webcontrols.webcontrol
{
protected Button mybutton;
protected override void OnInit()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.Controls.add(mybutton);
}
}
public class Gereral_Control:System.web.ui.webcontrols.webcontr ol
{
protected Box1 mybox1=new Box1();
protected override void OnInit(EventArgs e)
{
InitializeComponent();
}
private void InitializeComponent()
{
this.Controls.add(mybox1)
}
}
Take in count this piece of code, how could i make that: when i press the
button (the button inside the webcontrol Box1) appears some textboxes and
another button?(something like a form)
Thanks in advance.
Wong chian.