0
<div class="form-group">
<label>Faculty Name *</label>
@Html.TextBoxFor(i => i.FacultyName, new { @class = "form-control", @placeholder = "Technician e.t.c", @name = "txtfacultyname" })
@Html.ValidationMessageFor(i => i.FacultyName, "", new { @class = "error" })
</div>
<div class="form-group">
<label>EmailAddress *</label>
@Html.TextBoxFor(i => i.EmailAddress, new { @class = "form-control", @placeholder = "[email protected]", @name = "txtemailaddress" })
@Html.ValidationMessageFor(i => i.EmailAddress, "", new { @class = "error" })
</div>
<div class="form-group">
<label>User Name *</label>
@Html.TextBoxFor(i => i.UserName, new { @class = "form-control", @placeholder = "abc e.t.c", @name = "txtusername" })
@Html.ValidationMessageFor(i => i.UserName, "", new { @class = "error" })
</div>
參見[設置焦點上的EditorFor而不使用JavaScript](http://stackoverflow.com/questions/24934846/set-focus-on-an-editorfor-without-使用的JavaScript/24935030#24935030) –
作爲一個方面說明刪除你毫無意義的'new {@name =「xxx」}'幸運的是它什麼也沒做(看你生成的html),因爲它確實,模型綁定會失敗。 –