Skip to content

Instantly share code, notes, and snippets.

@ErikHen ErikHen/Login.cshtml
Created May 11, 2017

Embed
What would you like to do?
Episerver Mixed-mode auth. Login view
@{ Layout = null; }
@model MyNamespace.Models.LoginViewModel
<!DOCTYPE html>
<html>
<head>
<title>Log in</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow" />
</head>
<body>
<div class="login">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary()
<div>
<div>
@Html.LabelFor(x => x.Username)
@Html.TextBoxFor(x => x.Username)
</div>
<div>
@Html.LabelFor(x => x.Password)
@Html.PasswordFor(x => x.Password)
</div>
<div>
<input type="submit" value="Log in"/>
</div>
</div>
}
@using (Html.BeginForm("AdfsLogin", "Login", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))
{
@Html.AntiForgeryToken()
<div class="linkwrapper">
<a onclick="document.forms.item(1).submit();">Log in with your AD account</a>
</div>
}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.