I am having a problem accessing the ViewData object through javascript.
I have set the ViewData object on the controller and on document.ready event of the view i am trying to see the contents of that same ViewData object like so:
var test = <%= ViewData["NAME"].ToString() %>;
alert(test);
I don't get an alert message after this and none of my script after this statement will run. I am assuming this script is invalid thus killing everything afterwards. I have tried a few different variations of this same script without any luck.
What am i missing here?
Thanks in advance, Billy