aspnetcore/test/WebSites/SecurityWebSite/Views/Home/Index.cshtml

22 lines
574 B
Plaintext

@{
ViewData["Title"] = "Home Page";
}
<h1>Hello!</h1>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js"></script>
<script>
$(document).ready(function () {
$.ajax({
type: "get",
dataType: "html",
url: '@Url.Action("Antiforgery", "Home")',
data: {},
success: function (result) {
alert("We were redirected to login!");
},
error: function (err, scnd) {
alert(err.statusText);
}
});
});
</script>