I wanted to get opinions before I design a survey questionaire manager class. I wanted to take a decent or good approach to it.
So lets say for instance I have 10 survey questions to be display on a silverlight page.
What be the best approach to designing this class. The ultimate goal is just to set ten questions or 10 strings up to max 500 characters in 10 textbox controls.
1.Would you guys use a dictionary that contains all questions?
for example
2. Would you guys just set the 10 questions to the textbox controls itself?
3. Would guys create a xml configuration file with the 10 questions?
3. what would be the best approach?
Loading
David SmithPosted Oct 19, 2011, 6:35 AM
Vipul KelkarPosted Oct 19, 2011, 6:25 AM
http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-5-using-the-listbox-and-databinding-to-display-list-data.aspx
David SmithPosted Oct 19, 2011, 6:19 AM
David SmithPosted Oct 19, 2011, 6:17 AM
Vipul KelkarPosted Oct 19, 2011, 5:55 AM
http://msdn.microsoft.com/en-us/library/c012haty%28v=vs.71%29.aspx
Vipul KelkarPosted Oct 19, 2011, 5:50 AM
In this case i assume you are not using database to store your questions. In case you are using a database, you could retrieve your data in a dataset and bind it to a repeater control. This way you can vary the number of questions that can be displayed.
The repeater control can also be bound to an xml file.
have a look at this article
http://www.packtpub.com/article/the-asp-dot-net-repeater-control