Yikes .. I feel like this one should be obvious, but I guess I’m brainblocking here – Even so much that I don’t know what to search for in google :S Oh well, SO to the rescue 🙂
Say I got this .aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="MyPage" %>
<script type="text/javascript">
//<!-- I want to inject a JSON string here, which is generated per side-request -->
function doStuffToMyData(){
// .....
}
</script>
Any idea how I can inject a JSON string here? I got no problem generating the string, or parsing it in the browser..
It could be there’s an easier way to do this? I basically want to manipulate the looks of the side, depending on changes to this data, so I figured it would be easiest to have the data as a JSON string.
Thanks in advance 🙂
It should be something like:
Assuming that in your codebehind, you’ve declared something like: