views:

241

answers:

1

I'm stumped again on how to proceed with a survey system I am working on. We have database data for matrix sytle questions (rows are various questions, columns are various answer types), where each cell needs to be able hold a different kind of control. We have a database framework for this. The problem comes with how to dynamcially render this onto the screen. We need to be able to control the placement of various answers. My initial thought was having to use a placeholder and write several LiteralControls into it to build the HTML for a table and control the spacing that way. Would it be possible to do this using a GridView instead? I am not sure which one would be the easier method. If there are other possiblities, I could really use the ideas. AJAX is not an option.

This is similar to a question I have previously asked, but this has more to do with the controls on the aspx page, rather than the bare logic behind it.

A: 

Depends on the question/answer type in the survey. If every question/answer is of of the same type (say, multiple answers or only 1 answer) then you use a repeater control and a user control. The user control will display the question/answer appropriately, meaning, render the answers as a list of check boxes (for multiple choice answer) or radio buttons for 1 answer only.

HTH

rams

related questions