Dr.Ajay Kashyap

Dr.Ajay Kashyap

  • NA
  • 521
  • 284.1k

how to set all page content at centre in asp.net mvc

Jun 13 2016 12:37 PM
 
@model ShopINdeal.Models.AdminUser
 
@{
ViewBag.Title = "LogIn";
 
Layout = "~/Views/Shared/_Layout1.cshtml";
}
 
<h2>LogIn</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class=form-horizontal>
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.ContactNo, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-3">
@Html.EditorFor(model => model.ContactNo, new { htmlAttributes = new { @onKeyPress = "return isNumber(event);", @onkeyup = "return limitlength(this, 11);", @class = "form-control", @placeholder = "Enter Mobile No" } })
@Html.ValidationMessageFor(model => model.ContactNo, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.Password, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-3">
@Html.EditorFor(model => model.Password, new { htmlAttributes = new { @class = "form-control", @placeholder = "Password" } })
@Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Log In" class="btn btn-default" />&nbsp;&nbsp;
@Html.ActionLink("Forgot Password", "forgotpassword", "AdminUserLogin")
</div>
</div>
</div>
}

Answers (8)