Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Control Layout of Panel programmatically

Thread Tools

Control Layout of Panel programmatically

Posts: n/a
Hey all, last question on this subject - I hope.

I'm programmatically adding a Panel to a webpage and also programmatically
I'm adding controls to that Panel.

How do I control the layout of those controls that I put into the Panel?

Right now they are all just getting put onto the same line - when I was
doing Java development I could set the layout for JPanels and then add
components to them.

Does the same principle apply for .Net Panels? If so, can you direct me to
a tutorial on how to do this?

Or show me via an example - how at least I can put a line separator in
between two controls - example:
Panel panel = new Panel();
Label label1 = new Label();
label1.Text = "some text";
//Need a line separator to be added to Panel here
Label label2 = new Label();
label2.Text = "some text";

Reply With Quote
Alex Homer
Posts: n/a

panel.Controls.Add(new LiteralControl("<br />"));


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Java Control Panel in START menu->Control Panel: Diff javacpl.cpl and javacpl.exe? Robin Wenger Java 0 08-18-2011 06:38 AM
Why is there no "Java Control Panel" for J2EE v5upd14 ? Reinstall Java Control Panel possible? Ulf Meinhardt Java 0 07-07-2009 08:38 AM
Choosing Layout: Css-Layout or Table-Layout ASP .Net 1 06-19-2006 10:06 AM
Grid Layout Panel and Panel in the Designer Chris ASP .Net Web Controls 0 08-28-2003 03:28 PM
DataList inside a Grid Layout Panel (<DIV>) item layout problem Rick Spiewak ASP .Net 3 08-26-2003 04:22 AM