Dim Textboxes() as Textbox
redim Textboxes(TextboxCount)
For x=1 to TextBoxCount
Dim Textboxes(x) as New TextBox
TextBoxes(x).Text = "Fill Me out"
Textboxes(x).ID = "Text" & x
PlaceHolder1.Controls.Add(Textboxes(x))
next x
That will create "TextBoxCount" number of textboxes using an array and
using the element value to make the ID's unique.
You can then add each one to a placeholder or other object.
Textboxcount can be a session value passed from a previous page.
On Mon, 14 Feb 2005 08:13:08 -0800, "Tim::.." <myatix_at_hotmail.com>
wrote:
Hi,
Can someone please tell me the best way to create a web form on the fly
according to a users input???
EG: If a user chooses the number 3 from a dropdownlist 3 textbox items are
created... or if they choose 4 for textboxes are created.
Should AI use a repeater or what is the best solution??? I would be grateful
for any advice! The other thing is if the user chooses 3 textboxes and they
are dynamically created how do I create an unique id for each textbox???
Thanks for any advice!