Connecting Tech Pros Worldwide Forums | Help | Site Map

Controls of Panel Layout problem

JimWu's Avatar
Newbie
 
Join Date: Aug 2007
Posts: 14
#1: Aug 29 '07
Do anyone know how to layout in Panel control.

The code as follows

Expand|Select|Wrap|Line Numbers
  1.  
  2.  labels[0].Text = "Album Name :";
  3.  labels[1].Text = "Title :";
  4.  labels[2].Text = "Tag :";
  5.  labels[3].Text = "Description :";
  6.  textboxs[0].Text = "";
  7.  textboxs[1].Text = _fileName;
  8.  textboxs[2].Text = "";
  9.  textboxs[3].Text = "";
  10.  
  11.   images.ImageUrl = "./jpgs/" + a.getFileWithoutExt() + "_small.jpg";
  12.  
  13.  
  14.   panels[_iFile].Controls.Add(labels[0]);
  15.   panels[_iFile].Controls.Add(droplists[0]);
  16.   panels[_iFile].Controls.Add(new LiteralControl("<a href='#' onclick='popup();'>add</a>"));
  17.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  18.  
  19.   panels[_iFile].Controls.Add(labels[1]);
  20.   panels[_iFile].Controls.Add(droplists[1]);
  21.   panels[_iFile].Controls.Add(new LiteralControl("<a href='#' onclick='popup();'>add</a>"));
  22.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  23.  
  24.   panels[_iFile].Controls.Add(labels[2]);
  25.   panels[_iFile].Controls.Add(textboxs[ 2]);
  26.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  27.  
  28.  panels[_iFile].Controls.Add(labels[3]);
  29.   panels[_iFile].Controls.Add(textboxs[3]);
  30.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  31.  
  32.   panels[_iFile].Controls.Add(images[_iFile]);
  33.  
  34.    form.Controls.Add(panels[_iFile]);
  35.  
  36.  
I wander to know how to layout in Panel's inside sub controls such as textBox, Label and etc.

Since we add a new control to the panel, the controls is so closing next incoming new control.

So I want to use like Css apperence to my page.


Cound anyone know how to use formatted layout in my page.

Thanks for any kindly help.

Jim.

Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#2: Aug 29 '07

re: Controls of Panel Layout problem


If this is a web application, none of that code matters to your layout in a sense.
You can just use CSS to control where they go.
JimWu's Avatar
Newbie
 
Join Date: Aug 2007
Posts: 14
#3: Aug 30 '07

re: Controls of Panel Layout problem


Thanks for your kindly answer.

Now, I know how to show my wanted page.



Quote:

Originally Posted by Plater

If this is a web application, none of that code matters to your layout in a sense.
You can just use CSS to control where they go.

Reply