简体   繁体   中英

Telerik MVC grid, ajax binding and MVC areas

I changed my project and separated my files into areas but now my ajax bind dont work.

.DataBinding(dataBinding => dataBinding.Ajax().Select("GridAjax","Products"))

GridAjax is action while Products is controller.

Products controller is in my Areas/user/controllers

but i got url request like

http://localhost:1056/user/null

Any solution?

Try this:

dataBinding.Ajax().Select("GridAjax", "Products", new { area = "user" })

The Select() method has a few overloads that allow to specify other routing options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM