The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team June 17, 2006 06:53 AM UTC
Hi Renish,
I am not sure what you are trying are you just trying to create controls at runtime through code?
Here is a sample code I am ataching where the control ( a textbox and a label is placed inside a panel at runtime ). You can use this code in either page_Load or Page_Init
Remember because of I am using two controls I am using an another control. You can try the same in any of the controls you are in need of
Control control=new Control();
TextBox textBox=new TextBox();
control.Controls.Add(textBox);
Label lbl=new Label();
lbl.ForeColor=Color.Red;
lbl.Text="Enter Text Here";
control.Controls.Add(lbl);
this.Panel1.Controls.Add(control);
Hope this helps!
Regards,
A.Sivakumar
ADAdministrator Syncfusion Team September 29, 2006 01:43 PM UTC
>Hi Renish, > > I am not sure what you are trying are you just trying to create controls at runtime through code? > >Here is a sample code I am ataching where the control ( a textbox and a label is placed inside a panel at runtime ). You can use this code in either page_Load or Page_Init > >Remember because of I am using two controls I am using an another control. You can try the same in any of the controls you are in need of > >Control control=new Control(); > > TextBox textBox=new TextBox(); > control.Controls.Add(textBox); > Label lbl=new Label(); > lbl.ForeColor=Color.Red; > lbl.Text="Enter Text Here"; > control.Controls.Add(lbl); > this.Panel1.Controls.Add(control); > >Hope this helps! > >Regards, >A.Sivakumar