<div class="field-wrap">
@Html.TextBoxFor(model => model.Username, new { @class = "form-control", id = "SignupUsername" , placeholder = "Username", @required = "required", autofocus = "" })
@Html.ValidationMessageFor(model => model.Username, "", new { @class = "text-danger" })
</div>
controller::>>
var employees = GetEmployees();
ViewBag.categorylist = new SelectList(employees, "Id", "Name");
html
@Html.DropDownListFor(model => model.Item2, ViewBag.categorylist as SelectList, "---SelectList--", new { onchange = "rahul()" })
No comments:
Post a Comment