I am trying to convert the following Javascript code from C# razor in to use it in Vbhtml. When I plug the code in my vb.net environment, i get the following error " BC36637: The '?' character cannot be used here. " and the semi-colon ';' at the end of false gives me a syntax error as well. Thank you for guiding me on that.
<script type="text/javascript">
function AppViewModel() {
var self = this;
self.loggedIn = @(Request.IsAuthenticated ? "true" : "false");
}
$(document).ready(function () {
ko.applyBindings(new AppViewModel());
});
</script>