I have the following code:
@(Html.Kendo().Grid<CheckinViewModel>() .Name("grid_#=SubmissionLineItemId#") .Columns(cols => { cols.Command(cmd => cmd.Destroy()).Width(100); cols.Bound(ci => ci.Id).Hidden(); cols.ForeignKey(ci => ci.StorageAreaId, (IEnumerable)ViewData["storageAreas"], "Id", "Name").Title("Storage Area"); cols.Bound(ci => ci.Quantity); cols.Bound(ci => ci.Bags); cols.Bound(ci => ci.Buckets); cols.Bound(ci => ci.Jars); }) .ToolBar(tb => { tb.Create().Text("Add Checkin"); tb.Save(); }) .Editable(ed => ed.Mode(GridEditMode.InCell)) .DataSource(ds => ds.Ajax() .Read(read => read.Action("Get", "Checkins", new { submissionItemId = "#=SubmissionLineItemId#" })) .Update(update => update.Action("Update", "Checkins")) .Create(create => create.Action("Create", "Checkins", new { submissionId = @Model.Id, submissionItemId = "#=SubmissionLineItemId#" })) .Destroy(destroy => destroy.Action("Delete", "Checkins")) .Batch(true) .Model(m => { m.Id(ci => ci.Id); m.Field(ci => ci.StorageArea).Editable(false); }) .Events(ev => ev.RequestEnd("updateSubmissionGrid")) ) .ToClientTemplate())This all works fine running through Visual Studio (development server). However, when I deploy it to my test server, something (I'm not 100% sure what) causes an error. The message "Uncaught SyntaxError: Unexpected token ILLEGAL" (found in the Console of the Chrome browser tools) appears when I expand a row in the parent grid. Subsequently clicking the "Create" button causes an error on my server-side code, as the IDs ("#=SubmissionLineItemId#") are not substituted. Any idea what could cause this?