views:

110

answers:

1

based on the solution here: http://stackoverflow.com/questions/827175/entering-values-into-database-from-unlimited-dynamic-controls

i could successfully create dynamic asp.net controls at runtime. so if the user enters 10, it displays 10 textboxes and if the user enters 50 it displays 50. so far it's good. but 50 textboxes would make the page very lengthy.

how should i display the textboxes side-by-side? is paging a good idea?

+2  A: 

A scrollable div would be a better option.

Render all the textboxes as children of a div with fixed height and width and set oveflow property to auto.

rahul
that's a good solution. but a fixed height created unnecessary space on page load. is there any way i can make it flexible?
fuz3d
Is it necessary that the div should appear on page load??If it should be made visible in the combo change event then you can change the height of the div in JavaScript.
rahul
i did that, but when the page postbacks again, and let's say the user selects 2 textboxes, there's still a lot of unnecessary space. can't it be made flexible like the html table, which only expands when needed?
fuz3d