Let me explain my current objective:
$(document).ready(function () {
@if (ViewBag.VerifyIfLoggedIn) {
$("#needlogin-popup").dialog({
modal: true,
closeOnEscape: true,
minHeight: 384,
minWidth: 596,
resizable: false,
show: {
effect: 'slide',
duration: 500,
direction: 'up'
},
hide: {
effect: 'slide',
duration: 250,
direction: 'up'
},
title: 'Inicie Sesion'
});
}
});
If a certain condition is met, the JavaScript code above should be executed on the page.
However, an error is occurring:
CS1056: Unexpected character '$'
Is there a way to instruct Razor to ignore parsing and simply display the content within the conditional statement?