I have been developing a web app using asp.net and angularjs. In order to pass my session variable from c# to javascript, I have implemented the following code:
<script type="text/javascript">
var pm = "<%= Convert.ToString(Session["mysession"]) %>";
var log = "<%= Convert.ToString(Session["radio"]) %>";
</script>
However, I encountered an error: BC30203: Identifier expected.
This error specifically occurred on:
Line 111: var pm = "<%= Convert.ToString(Session["mysession"]) %>";
Can anyone provide insights into what the potential reason for this error could be?