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

只谈情不闲聊 提交于 2019-12-11 21:51:32

问题


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"))) _

回答1:


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. ;)



来源:https://stackoverflow.com/questions/53363604/in-mvc-html-kendo-grid-is-not-passing-to-the-controller-from-view-through-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!