143
rated 0 times
[
149]
[
6]
/ answers: 1 / hits: 21334
/ 14 Years ago, thu, december 16, 2010, 12:00:00
I am using asp.net mvc 3 with razor for a project.
At some I need to serialize an array from the controller, put it in the viewdata and assign it to a js object. However when I output it using
@ViewData[some array]
The result is html escaped so i get something like :
[{"title":"Something","id":"Something-1" etc'
With the <%= %> this was not escaped so it was behaving as expected.
Is it possible to tell razor not to escape this string. Perhaps, someone might suggest another approach all together.
Thanks in advance for any ideas
More From » asp.net-mvc-3