vendredi 29 mai 2020

Blazor Server-side not loading event listeners

Im building a Blazor Server-side website and im using a template for the design. This includes css and js files.

For some reason the event listeners are not working! I have a button that uses css and js to do some stuff. If I start the website then nothing happens when I press the button. But if I then refresh the page with CTRL+F5 then it works!

Im using .Net Core 3.1.

Normal F5 refresh of the website (don't work):

enter image description here

CTRL+F5 refresh of the website (now it works):

enter image description here

_Host.cshtml

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title</title>

<link rel="stylesheet" media="screen" href="css/vendor.css">
<link rel="stylesheet" media="screen" href="css/theme.css">
<script src="js/modernizr.min.js"></script>
<script src="_framework/blazor.server.js"></script>
<script type="text/javascript" src="js/vendor.min.js"></script>
<script type="text/javascript" src="js/theme.min.js"></script>



Aucun commentaire:

Enregistrer un commentaire