I create controls for data input on the fly. It consist of set of (rows) labels and textboxes/comboboxes.
Panel1.Controls.Add(new LiteralControl("<br>"));
Label lbl = new Label();
lbl.Text = descTest;
Panel1.Controls.Add(lbl);
Panel1.Controls.Add(new LiteralControl(" : "));
Panel1.Controls.Add(ddList);
Now the labels and textboxes of all the rows are not aligned. How can it be done? I need to rows & columns?
You can use
asp:Tableinstead, it will make lot easier for you to format things in rows and columns:aspx:
Code behind: