Hello,
I wish to know the protected property ChildControlsCreated property (to know the childrens of the Panel) when a button is clicked. Please tell me where I am wrong.The Label3.text should show "True" but displaying "false". why is that so?
It is the same for other properties like adapter.
regards
Manoj
protected void Button1_Click(object sender, EventArgs e)
{
Panel pp = new Panel();
TextBox t1 = new TextBox();
pp.Controls.Add(t1);
TextBox t2 = new TextBox();
pp.Controls.Add(t2);
class2 cc = new class2();
//Boolean bb2 = cc.xx1();
Boolean bb2 = cc.b1;
Label3.Text = bb2.ToString();
}
public class class2 : Panel
{
public Boolean b1;
public void xx1()
{
Panel pp = new Panel();
TextBox t1 = new TextBox();
pp.Controls.Add(t1);
TextBox t2 = new TextBox();
pp.Controls.Add(t2);
b1 =base.ChildControlsCreated;
}
}