views:

64

answers:

1

Hi,

I'm developing an online survey application for my University project.

I managed to save the newly created survey data into the database and now the problem is that i don't know how to populate the saved questions into a page (which sent to the customer to get responses) dynamically. And that response data should also be saved to the database.

Can anyone please help me on this. I'm using ASP.NET for this.

Thanks

+1  A: 

First you need some database calls to get the questions.

  • select (id, description) from questions

Then you need to populate this information into a Data Control. I suggest a DataList or Repeater.

Assuming that the answers will be yes/no, you also need to add something like a RadioButtonList to collect the yes or no selection to the ItemTemplate.

You will need to submit the form, so a Button should be used. In the click event, loop through each row of the DataList/Repeater and gather the answers.

TheGeekYouNeed
Thanks Cen for yout early reply. This is very helpful and can I add the user responses like free text (not radio buttons) in the same way you suggest ?
Hash
TheGeekYouNeed
Hash did you find this helpful? If so, do you mind marking the question as answered so others can see the answer too? Thanks!
TheGeekYouNeed