You are probably adding the textbox into the Page directly instead of adding it to the Page’s form. Try doing this:
VB.NET
Me.Page.Controls(1).Controls.Add(txtboxctrl)
C#
this.Page.Controls[1].Controls.Add(txtboxctrl);
You are probably adding the textbox into the Page directly instead of adding it to the Page’s form. Try doing this:
VB.NET
Me.Page.Controls(1).Controls.Add(txtboxctrl)
C#
this.Page.Controls[1].Controls.Add(txtboxctrl);
Share with