I have to move all my scripts into a separate .js
file. But I have wired the code in the client (*.aspx
) file, with code such as
<script>
var x=<%=ViewData["Key"];%>
</script>
I'm sure there will be an issue when I move that line to the js
file as the server side context can't be accessed.
How do I solve this issue?