Hello ,i'm doing a questionnaire web application and i'm using ASP MVC ,
i have a problem here how can list the questionnaire questions and options from SQL DB i wore this in View Page , what should i do in my controller
i have 3 tables
Survey : Id, Q1 .. ,Q11 , Date Modified , Customer Details
Questions: Id, Text
Answers : Id, Text , Value
for exapmle
Q1:
a. excellent b. very good c. good d. weak e. none
and each option has a value like excellent : 10 , good : 7 and ect.
any help please :D
What I have tried:
@using (Html.BeginForm("SurveyQuestions", "ESurvey", FormMethod.Post)) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
for (int i = 0; i
@for (int k = 0; k
@for (int j = 0; j model.Questions[k].Text_ar)
@Html.DisplayFor(model=> model.Answers[j].Answer_text) model.Answers[j].Answer_weight)/> @Html.DisplayFor(model=> model.Answers[j].Answer_text) model.Answers[j].Answer_weight)/> @Html.DisplayFor(model=> model.Answers[j].Answer_text) model.Answers[j].Answer_weight) /> @Html.DisplayFor(model=> model.Answers[j].Answer_text) model.Answers[j].Answer_weight) /> @Html.DisplayFor(model=> model.Answers[j].Answer_text) model.Answers[j].Answer_weight) /> } } } }