c# - in _ViewStart,cshtml, how come the Javascript part does not get executed every time when I goto another page? -
in code below located in _viewstart.cshtml, reason, inside @{ } gets executed everytime when goto page, javascript part not, why , how fix it?
<script> alert("in side viewstate"); </script> @{ layout = "~/views/shared/mylayout.cshtml"; }
this javascript code has put in mylayout.cshtml, not _viewstart. _viewstart.cshtml special view sets razor variables, not contain html code.
Comments
Post a Comment