Skip to content

Instantly share code, notes, and snippets.

@LazZiya
Last active August 20, 2020 07:43
Show Gist options
  • Save LazZiya/1968c7f8e436a1adfd6df46a0099d04c to your computer and use it in GitHub Desktop.
Save LazZiya/1968c7f8e436a1adfd6df46a0099d04c to your computer and use it in GitHub Desktop.
Asp.Net Core XLocalizer sample of registration form.
@page
@model RegisterModel
@{
ViewData["Title"] = "Register";
}
<h1 localize-content>@ViewData["Title"]</h1>
<div class="row">
<div class="col-md-4">
<form asp-route-returnUrl="@Model.ReturnUrl" method="post">
<h4 localize-content>Create a new account.</h4>
<hr />
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Input.Email"></label>
<input asp-for="Input.Email" class="form-control" />
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Input.Password"></label>
<input asp-for="Input.Password" class="form-control" />
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Input.ConfirmPassword"></label>
<input asp-for="Input.ConfirmPassword" class="form-control" />
<span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span>
</div>
<button type="submit" class="btn btn-primary" localize-content>Register</button>
</form>
</div>
</div>
@section Scripts {
<partial name="_ValidationScriptsPartial" />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment