Position Web control within Panel on Web Form ... programatically

M

M-

Is it possible to position a Web Form control within a
Panel ... programattically? That is, by adding lines to
the following code:


protected System.Web.UI.WebControls.Panel Panel1;

private void Page_Load(object sender, System.EventArgs e)
{
Panel1.BackColor= System.Drawing.Color.White;
Panel1.Height=95;
Panel1.Width=200;
System.Web.UI.WebControls.DropDownList DDL1 = new
DropDownList();
DDL1.Height=30;
DDL1.Width=120;
Panel1.Controls.Add(TB2);
}

or, some other way?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top