Emulating the VB6 control array with ASP.NET

I have a web form which needs to have a certain number of text boxes stacked on top of each other, which I get from a database. Underneath those text boxes are some other text boxes and buttons.

I have tried making 10 text boxes and setting visibility on the ones I need, but I can't move the other text boxes and buttons up. They are already declared in the HTML at a certain position.

I have tried adding text boxes at runtime, but the controls must be placed inside a <form> tag.

I have also tried using a datagrid, but have run into many other problems trying to accomplish what I need to accomplish.

Any help is appreciated. Thanks.
gsutphin11Asked:
Who is Participating?
 
Bob LearnedCommented:
>>I have tried adding text boxes at runtime, but the controls must be placed inside a <form> tag.
Were you trying to add the TextBox controls in the Page_Load event or the Page_PreRender event?

Bob
0
 
gsutphin11Author Commented:
I was using the Page_Load event. I will try the Page_PreRender. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.