Hi,
I want to pass only one record at a time from the list & on the clicking of next button fetch the another record from the list .
Below is my Controller:-
- public ActionResult Questions()
- {
- List
quesLOV = new List (); - QuestionsModel quesModel = new QuestionsModel();
- quesModel.Ques_ID = 1;
- quesModel.Questns = "Qualities of Deliverable";
- quesLOV.Add(quesModel);
- quesModel = new QuestionsModel();
- quesModel.Ques_ID = 2;
- quesModel.Questns = "Adherence to timeliness/Schedule";
- quesLOV.Add(quesModel);
- quesModel = new QuestionsModel();
- quesModel.Ques_ID = 3;
- quesModel.Questns = "Estimation Accuracy?";
- quesLOV.Add(quesModel);
- return View(quesLOV.ToList());
- }
VIEW:-
- @model IList
- @{
- ViewBag.Title = "Questions";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- class="container-fluid">
- >
class="alert alert-dismissible alert-primary">- @foreach (var Obj in Model)
- {
- >Questions:@Obj.Questns
- "input-1" name="input-1" class="rating rating-loading" data-min="0" data-max="5" data-step="0.1" value="2" data-size="sm">
- }
- class="btn btn-outline-primary btn-lg" style="float:right">Next
Please suggest .
Thank you
Jefferson S. MottaPosted Oct 10, 2019, 4:56 PM