| Author: UltimateRengan 25 Jul 2008 | Member Level: Diamond | Rating: Points: 1 |
Dim x As New TextBox x = New TextBox Me.Controls.Add(x) Dim y As New Label y.Text = "runtime" Me.Controls.Add(y)
|
| Author: Biju 26 Jul 2008 | Member Level: Gold | Rating: Points: 4 |
hi,
As your question, you are not menstioning for using asp.net or Vb.net
using asp.net,
you can use the place holder control,
once you placed the place holder, then write the below code snipet
TextBox txtName = new TextBox(); txtName.Id = "txtName";
Regards Biju S
|
| Author: Sabu C Alex 28 Jul 2008 | Member Level: Gold | Rating: Points: 6 |
hi
see this code
TextBox txt = new TextBox(); txt.Location = new Point(1, 1); txt.Text = "Your Text"; this.Controls.Add(txt);
Label lbl = new Label(); lbl.Location = new Point(3, 3); lbl.Text = "Name"; this.Controls.Add(lbl);
check ur forms Designer file. so that you can understand how framework creating controls.
if you are working with c# file name id form.Designer.cs if vb then
file name is form.Designer.vb
|