Hello if i wnat to call the following script after check the ModelState property in the controller in order to ensure validation, how can i implment this :
the view also contatin beginForm that will be associated to action in controller to check ModelState:
- @using (Html.BeginForm("LoginProcess", "Login"))
- {
- class="container">class="row">class="col-md-6 col-md-offset-3 alert alert-warning">class="row">class="col-md-12">class="form-group">
- @Html.LabelFor(c => c.Customers.Name)
- @Html.TextBoxFor(c => c.Customers.Name, new { @class = "form-control" })
- @Html.ValidationMessageFor(c => c.Customers.Name)
class="form-group">- @Html.LabelFor(c => c.Customers.Password)
- @Html.TextBoxFor(c => c.Customers.Password, new { @class = "form-control" })
- @Html.ValidationMessageFor(c => c.Customers.Password)
- @Html.AntiForgeryToken()
- class="btn btn-primary">Save
- }
Ehsan SajjadPosted Mar 8, 2017, 2:14 AM
Fares AyyadPosted Mar 7, 2017, 10:08 AM
Joginder BangerPosted Mar 7, 2017, 8:57 AM