Question on asp.net user/server controls
Let me start by describing what I need to do:
I am writing an "online questionnaire" page, which needs to display a
variable number of questions (typically 1-5) on screen. Each question
has a number of answers (typically 2-5) in the form of radio buttons.
Upon clicking submit, I need to save the selected answers, then
recursively call the page again to display the next group of
questions, and so on until the end of the questionnaire.
That's about it really. Now it sounds to me like one solution is to
have some kind of "Question" control (user or server control??) with
properties to let me set the question text, answer texts, and any
other formatting (eg. display the answers vertically/horizontally). I
would also want some property that returns the selected answer when
Submit is clicked.
The problem I have is that the code examples I have come across have
been pretty basic 'hello world' stuff - just consisting of some
properties that can be set via html attributes to change colours,
I haven't seen any examples of how to manipulate a control from within
the code-behind of the page the control is on (if that is even
I was thinking that I would initialise the controls within Page_Load,
and then retrieve the selected answers from the Submit button's
I would be grateful for any guidance, pointers, examples or
suggestions to get me started.
Many thanks in anticipation
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center