Search code examples
asp.net-mvcmodel-view-controllerkendo-uikendo-gridkendo-asp.net-mvc

In MVC ,Html Kendo Grid is not passing "&" to the controller from view through Datasource


Kendo grid datasource is not passing values "&" from view to controller in MVC

For instance from the below code if testIdVal value is "Interface Class & Function" . Only "Interface Class" are being passed to the controller .

.DataSource(Function(d) d.Ajax() _
                                    .Read(Function(read) read.Action("GetResourcesForRolesForRootDomain", "Inquiry", New With {.testId= "#=testIdVal#"}).Type(HttpVerbs.Post).Data("additionalData"))) _

Solution

  • Two ideas on that one: Try to add encodeURIComponent around testIdVal: "#=encodeURIComponent(testIdVal)#" or add testIdVal in additinaldata. By the way, there is a typo in additinaldata. ;)