TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ritendra Mall
NA
316
33.3k
Pass one value at a time from the list
Oct 10 2019 2:47 PM
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<QuestionsModel> quesLOV =
new
List<QuestionsModel>();
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<QuizDemo.Models.QuestionsModel>
@{
ViewBag.Title =
"Questions"
;
Layout =
"~/Views/Shared/_Layout.cshtml"
;
}
<div
class
=
"container-fluid"
>
<hr />
<form style=
"padding-top:50px"
>
<div
class
=
"alert alert-dismissible alert-primary"
>
@
foreach
(var Obj
in
Model)
{
<label style=
"font-size:25px;padding-bottom:50px"
>Questions:@Obj.Questns</label>
<input id=
"input-1"
name=
"input-1"
class
=
"rating rating-loading"
data-min=
"0"
data-max=
"5"
data-step=
"0.1"
value=
"2"
data-size=
"sm"
>
}
</div>
<button type=
"button"
class
=
"btn btn-outline-primary btn-lg"
style=
"float:right"
>Next</button>
</form>
</div>
Please suggest .
Thank you
Reply
Answers (
1
)
JavaScript for a checkbox
Parameter Error in Stored Procedure