0

Hi,

I'm new in asp and c# and I've being looking everywhere on how to dynamically create multiple html tables based on a user input:

e.g.: user enter 3 in a text box and right below 3 tables are created with other text boxes for more user input.

Thanks

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by thiemebr
0

Just like you create any new object.
If you have a PlaceHolder on the page, create the new Table() and add it to the Controls of the PlaceHolder.

0

But there is any other way like adding a loop inside the html to create those tables instead of codebehind?

0

...and another question, what's the difference in adding the table using Controls.Add and HtmlTable table1 = new HtmlTable() ?

0

If you're just talking about adding it directly to the PlaceHolder -- virtually nothing except with the latter will allow less syntax until you're ready to add it to the PlaceHolder.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.