asp.net
how to create panel dynamically?????
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gowtham RajamanickamPosted Apr 5, 2015, 1:26 AM
Khargesh RajputPosted Apr 4, 2015, 11:40 PM
But to Add a placeholder in aspx where you want to show panel
And in cs page
Panel pnl = new Panel();
TextBox txt=new TextBox();
pnl.Controls.Add(txt);
Plchold.Controls.Add(pnl);
Abhay ShankerPosted Apr 4, 2015, 8:42 PM
Panel pnl = new Panel();
this.form1.Controls.Add(pnl);
Label lbl= new Label(); //Controls to add in panel
lbl.Text="Test";
pnl.Width = 200;
pnl.Height = 200;
pnl.BackColor = System.Drawing.Color.Red;
pnl.BorderColor = System.Drawing.Color.Black;
pnl.Controls.Add(lbl);
pnl.Visible = true;
pnl.Enabled = true;
Dipankar BiswasPosted Apr 4, 2015, 11:53 AM
Panel pnl = new Panel();
TextBox txt=new TextBox();
pnl.Controls.Add(txt);
Form.Controls.Add(pnl);
Thanks