Controls at runtime
I am trying to create a whole page on the fly, it has heps of controls (radio, combo, text, dropdown, etc). Its like a survey form. I am then generating a submit button on the fly. Now the problem is that I want to add a button_click event for this button, but not sure how to? Also I would like to add other events for controls on the page (like if radio selected then unhide a couple of other controls), but again not sure how to do that at runtime.
I also tried creating a button in the design view (instead of runtime) and this works fine as then I can add click event easily, BUT problem with that is that I cannot get it to move down the page when other controls are being added at the runtime, so it basically stays where it was dragged to on the design window, and hence it overlaps with the controls created at run time.
This is my first asp.net application (framework 1.1), I would also like some advice on how to post the answers back to the database, when the form is submitted each answer would be stored in a separate row in the database, does that mean I have to call the stored procedure that many times (30-40 questions for each page) to submit each page?? Or is there a way I can pack all the answers in may be a recordset and then just send it to the database in one go??
Hope I have explained myself, please let me know if any further explanation is required.
Thanks a lot!