Bronzato
Bronzato

Reputation: 9342

Server code tag gives a warning (Expected expression) in jQuery script

I have some warnings in my solution (no errors). Several of them are 'Expected expression' on server code tag. Take a look on the screenshot here. These warnings are only in jQuery script, never in the html section.

Is it possible to avoid these warnings? My code run as expected.

Thanks for your help.

Upvotes: 1

Views: 1517

Answers (1)

Adam Terlson
Adam Terlson

Reputation: 12730

No. Visual studio doesn't like nesting code blocks like this at times. Just ignore it. Sometimes doing a rebuild makes them go away for whatever reason.

Also, be aware that JavaScript is not trustworthy and that this magic "IsAuthenticated" method in your JS is fallible and easily hacked. Be sure to cover your app!

Upvotes: 3

Related Questions