I have a string which I add in my controller..
ViewBag.mydata = "a,x,b,\na,y,b,....."
In my view in javascript code I call..
var myvar= @ViewBag.mydata;
when I see the view source html I find
var myvar = a,x,b,
a,y,b,
.......
I need myvar to be the string I sent in ViewBag..
Thanks