Dynamic control creation in C#

  • Thread starter Thread starter DMP
  • Start date Start date
D

DMP

Hi,
How can i create control dynamically in C# (Window Application) whose
property value retrive from database ?
regards,
 
TextBox tb = new TextBox();
tb.Text = GetValueFromDB();
myForm.Controls.Add(tb);

That's all. Maybe you additionally want to set position of your textbox and
size.
 
Back
Top