Created
October 5, 2019 12:48
-
-
Save emrekizildas/e9d94ae72d3293a77be3a91c1651b4d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using CSPExample.Helper | |
@{ | |
ViewData["Title"] = "Home Page"; | |
} | |
<div class="text-center"> | |
<h1 class="display-4">Welcome</h1> | |
<p>Learn about <a href="#" id="click">building Web apps with ASP.NET Core</a>.</p> | |
</div> | |
@section Scripts{ | |
<script type="text/javascript" nonce="@Html.Nonce()"> | |
var link = document.getElementById("click"); | |
link.addEventListener("click", function () { | |
alert("Clicked me!"); | |
}); | |
</script> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment