Home How to insert my model properties into this login bootstrap form?

# How to insert my model properties into this login bootstrap form?

user3510
1#
user3510 Published in July 23, 2018, 9:55 am
 Is it possible to put the model properties in this styled login form? I don't know where to put the lambda helpers (x=>x.email, x=>x.password etc). Any help is appreciated. @model User @using (Html.BeginForm("LogIn", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {

} @section Scripts { @Scripts.Render("~/bundles/jqueryval") }  Edit: the problem is now that i can't apply the wanted style on the input i tried adding @Html.EditorFor(x => x.Username, new { htmlAttributes = new{@class = "form-control"}}) and this also @Html.EditorFor(x => x.Username, new { @class = "form-control"}) and both doesnt work. with adding above im trying to get this style: but instead i'm getting these unstyled input boxes 2nd EDIT: Instead of using : @Html.EditorFor(x => x.Username, new { htmlAttributes = new { @class = "form-control" } }) I tried : @Html.TextBoxFor(x => x.Username, new { @class = "form-control" }) and with this i'm getting the desired style, so i dont exactly know the difference between Html.EditorFor and Html.TextBoxFor and if using Html.TextBoxFor is a good solution, maybe someone can clarify this.