i cant access k inside objDllColl[k] in Additional Data function kendo?
F-ES Sitecore
Writed by F-ES Sitecore:The code after "@" is executed server-side before the resulting html is sent to the browser. "j" exists as a javascript variable when the html runs in the browser, so you can't use it in your server-side code as it doesn't exist in that context. You need to construct all of the js using server code, something like this function onAdditional() { debugger; var ParamArray = new Array(); var points; @foreach(var m in Model.objDllCollection) { string p = string.Format("points = {0};\r\nParamArray.push(points);\r\n", Json.Encode(m.Parameters)); @Html.Raw(p); } }
function onAdditional() { debugger; var ParamArray = new Array(); var points; @foreach(var m in Model.objDllCollection) { string p = string.Format("points = {0};\r\nParamArray.push(points);\r\n", Json.Encode(m.Parameters)); @Html.Raw(p); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)