@model HelloWorldMvcApp.QuestionDTO
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
.field-validation-error {
@using (Html.BeginForm("AddQuestionDB", "Home"))
<legend>Add Question</legend>
<div class="editor-label">
@Html.LabelFor(model => model.QuestionDes)
<div class="editor-field">
@Html.TextBoxFor(model => model.QuestionDes , new { id="question" , Name="question"})
@Html.ValidationMessageFor(model => model.QuestionDes)
<div class="editor-label">
@Html.LabelFor(model => model.Answer1)
<div class="editor-field">
@Html.TextBoxFor(model => model.Answer1 , new { id="a1" , Name="a1"})
@Html.ValidationMessageFor(model => model.Answer1)
<div class="editor-label">
@Html.LabelFor(model => model.Answer2)
<div class="editor-field">
@Html.TextBoxFor(model => model.Answer2 , new { id="a2" , Name="a2"})
@Html.ValidationMessageFor(model => model.Answer2)
<div class="editor-label">
@Html.LabelFor(model => model.Answer3)
<div class="editor-field">
@Html.TextBoxFor(model => model.Answer3 , new { id="a3" , Name="a3"})
@Html.ValidationMessageFor(model => model.Answer3)
<div class="editor-label">
@Html.LabelFor(model => model.Answer4)
<div class="editor-field">
@Html.EditorFor(model => model.Answer4 , new { id="a4" , name="a4"})
@Html.ValidationMessageFor(model => model.Answer4)
<div class="editor-label">
@Html.LabelFor(model => model.Correct)
<div class="editor-field">
@Html.TextBoxFor(model => model.Correct , new { id="correct" , Name="correct"})
@Html.ValidationMessageFor(model => model.Correct)
<input type="submit" value="Add" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/4.0/jquery.validate.unobtrusive.min.js"></script