@model IdentitySample.Models.LoginViewModel @using System.Collections.Generic @using Microsoft.AspNet.Http @using Microsoft.AspNet.Http.Authentication @{ //TODO: Until we have a way to specify the layout page at application level. Layout = "/Views/Shared/_Layout.cshtml"; ViewBag.Title = "Log in"; }

@ViewBag.Title.

@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken()

Use a local account to log in.


@Html.ValidationSummary(true)
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) @Html.ValidationMessageFor(m => m.UserName)
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
@Html.PasswordFor(m => m.Password, new { @class = "form-control" }) @Html.ValidationMessageFor(m => m.Password)
@Html.CheckBoxFor(m => m.RememberMe) @Html.LabelFor(m => m.RememberMe)

@Html.ActionLink("Register a new user?", "Register")

@Html.ActionLink("Forget your password?", "ForgotPassword")

}

Use another service to log in.


@{ if (ViewBag.LoginProviders.Count == 0) {

There are no external authentication services configured. See this article for details on setting up this ASP.NET application to support logging in via external services.

} else { using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) { @Html.AntiForgeryToken()

@foreach (AuthenticationDescription p in ViewBag.LoginProviders) { }

} } }
@section Scripts { @*TODO : Until script helpers are available, adding script references manually*@ @*@Scripts.Render("~/bundles/jqueryval")*@ }