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
Manoj Maharana
NA
362
128k
MVC model for dynamic survey form step by step
Mar 31 2017 12:49 AM
MVC model for dynamic survey form step by step
Here is the html:
@
for
(
int
i = 0; i < Model.Questions.Count(); i++)
{
<div
class
=
"tab-pane active"
id=
"tab1"
>
@
for
(
int
k = 0; k < Model.Questions.Count(); k++)
{
<div
class
=
"row"
>
<div
class
=
"form-group"
>
<div
class
=
"col-md-12"
>
@*@Html.DisplayFor(model => model.Questions[k].QuestionText)*@
@*<br /><br />*@
@
for
(
int
j = 0; j < Model.Answers.Take(1).Count(); j++)
{
@Html.DisplayFor(model => model.Questions[k].QuestionText)
@*<label>3. When I am faced with a financial decision I am generally more concerned about the possible losses than the probable gains.</label>*@
<br /><br />
<div
class
=
"mt-checkbox-list"
>
<label
class
=
"mt-checkbox"
>
<input type=
"checkbox"
> @Html.DisplayFor(model => model.Answers[j].AnswerText)
<span></span>
</label>
<label
class
=
"mt-checkbox"
>
<input type=
"checkbox"
> @Html.DisplayFor(model => model.Answers[j].AnswerText)
<span></span>
</label>
<label
class
=
"mt-checkbox"
>
<input type=
"checkbox"
> @Html.DisplayFor(model => model.Answers[j].AnswerText)
<span></span>
</label>
<label
class
=
"mt-checkbox"
>
<input type=
"checkbox"
>@Html.DisplayFor(model => model.Answers[j].AnswerText)
<span></span>
</label>
<label
class
=
"mt-checkbox"
>
<input type=
"checkbox"
> @Html.DisplayFor(model => model.Answers[j].AnswerText)
<span></span>
</label>
</div>
</div>
how do i bind the question answer multiple choice in a model and html.
the above code not working properly.
I want in tab1 4 questions with multiple choice and tab2 4 questions with multiple choice.
here is the model:
public
List<QuestionsModel> Questions { get; set; }
public
List<AnswerModel> Answers { get; set; }
public
class
QuestionsModel
{
public
string QuestionText { get; set; }
public
string QuestionComment { get; set; }
}
public
class
AnswerModel
{
public
string AnswerText { get; set; }
public
bool
IsCorrect { get; set; }
}
can ayone guide me how do i create a model and html.so that it will bind question and answer in a survey form respectively in mvc4
Reply
Answers (
4
)
what is mean of rest full and why use .
Biztalk Issue:Error encountered during parsing. The X12 inte