At one point, I had no problem collecting the raw model by calling:
@Html.Raw(Json.Encode(Model));
but now I'm getting this error:
Uncaught SyntaxError: Unexpected toke ILLEGAL
in Chrome and IE and it's point right at that '@' character
I've this (as suggested in another stackoverflow post):
var getRawLayoutData = function() { return @Html.Raw(Json.Encode(Model)); }
var rawModelData = getRawLayoutData();
and this (also suggested in another stackoverflow post):
var rawModelData = [@Html.Raw(Json.Encode(Model))][0];
and nothing seems to work.
All I want to do is pass back some modified model data from the server to the client so I can react to the changing model data.
Any suggestions??
@(Html.Raw(Json.Encode(Model)))@{ }for block statements,@()seems a bit odd to me.. for clarification, this snippet is in acshtmlorvbhtmlpage that is being processed, right?@Html.Rawon a file/code that includes the code snippet you've provided us here...@Htmlnot in the past or present