-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.cshtml
31 lines (28 loc) · 1.02 KB
/
Index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@model CheckboxViewModel
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<form method="post" asp-antiforgery="false">
<label class="remember-me">
@* <input asp-for="RememberMe" id="RememberMe" class="form-check-input" /> *@
@Html.CheckBoxFor(x => x.RememberMe, new { @class = "form-check-input" })
<span>@Html.DisplayNameFor(m => m.RememberMe)</span>
</label>
<button class="btn btn-outline-secondary" id="prepare-btn">Prepare</button>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
</div>
@section Scripts {
<script>
$(function () {
$('#prepare-btn').click(function () {
$('#RememberMe').val('1');
$('#RememberMe').prop('checked', true);
return false;
});
});
</script>
}