i am working on a asp.net webforms app, and i have to create 'dynamic order lines' That is: you select a product and a quantity, and the amount is calculated. To visualize: this is on one 'line', so forst product dropdown, next to it the quantity textbox and next to that the amount label.
Then you click 'add another product', and another 'line' is added with a product dropdown, quantity textbox and amount label.
So you can click add and add and add....
Now i was thinking how to implement that, and i came up with two choises:
'add html client side' and 'add user control server side'
The first looks more fancy of course, but i also have to create some server side code to generate the lines again, when the user says 'go' but after validation i have to warn the user for example the amount was over credit or the quantity was to high. Then i get the 'client side' added html, and i have to reproduce that in my code behind, am i right?
On the other hand (add user control server side), i have to create a new user control on 'and another product' postback, which might look easier in the beginning because it's all strong typed, and the client side (jquery / javascript) isn't?
I'm looking forward to your opinions.
And one more thing: there is a possibility (they are not sure yet) that this functionality is wrapped within a 'section', with an address box and call it an order. And then: the user can add that 'section' also multiple times, so he can create multiple orders in one page, so i have to create multiple sections for an order, and within that order have the possibility to add another product.
It looks like it will be hard to do this client side, especially with generating id's?