Hi everyone,
I was wondering if I could get your opinion on something. I was asked to design a quiz for HR.
Something in the form below:
Category I
(1) I am cool. Agree O Disagree O Don't Know O
(2) You are cool. Agree O Disagree O Don't Know O
Category II
(1) I am cool. Agree O Disagree O Don't Know O
(2) You are cool. Agree O Disagree O Don't Know O
What would be the best way of designing this template? I already have the questions imported into the database (2 Tables) One category -> Many Questions is the relationship.
I briefly drafted up this code to spit the questions out.
What would be the best way of going about this? A binded repeater control? Dynamically adding controls to a form? The use of placeholders?
Any suggestions would be greatly appreciated!
Keith
I was wondering if I could get your opinion on something. I was asked to design a quiz for HR.
Something in the form below:
Category I
(1) I am cool. Agree O Disagree O Don't Know O
(2) You are cool. Agree O Disagree O Don't Know O
Category II
(1) I am cool. Agree O Disagree O Don't Know O
(2) You are cool. Agree O Disagree O Don't Know O
What would be the best way of designing this template? I already have the questions imported into the database (2 Tables) One category -> Many Questions is the relationship.
I briefly drafted up this code to spit the questions out.
Code:
private void LoadQuestions ()
{
DataSet dsHeaders = GetData ("select qHeadingID, qHeading from hrsurveyheadings");
int count = 0;
foreach (DataRow x in dsHeaders.Tables [0].Rows)
{
count = 1;
Response.Write ("<h4>" + x.ItemArray [1].ToString () + "</h4>");
DataSet dsQues = GetData ("select qQuestionID, qQuestion from hrsurveyquestions where qHeadingID = " + x.ItemArray [0].ToString ());
foreach (DataRow y in dsQues.Tables [0].Rows)
{
Response.Write ("(" + count + ") " + y.ItemArray [1].ToString() + "<br><br>");
count++;
}
}
}
What would be the best way of going about this? A binded repeater control? Dynamically adding controls to a form? The use of placeholders?
Any suggestions would be greatly appreciated!
Keith