@model Questionnaire @{ ViewData["Title"] = "DisplayQuestionnaire"; Layout = "~/Views/Shared/_QuestionnaireResponse.cshtml"; }

@Html.Raw(Model.Description)

@{ int questionNumber = 1; // Counter for question numbers, starting from 1 }
@foreach (var question in Model.Questions) {
@questionNumber. @question.Text
@if (question.Type == QuestionType.Multiple_choice) { @foreach (var answer in question.Answers) {
} } else if (question.Type == QuestionType.Ranking) { } else if (question.Type == QuestionType.TrueFalse) {
} else if (question.Type == QuestionType.Rating) {
@for (int i = 1; i <= question.Answers.Count; i++) { }
} else if (question.Type == QuestionType.Text) { } else if (question.Type == QuestionType.Slider) { 0 }

@@questionNumber ++; // Increment question number after displaying }
@section Scripts { @{ } }