Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1490
Can we call controller for DatasourceUrl as HttpPost?
posted

I'm using the DatasourceUrl on a grid along with MVC to call a controller method that returns a datatable with data for the grid. The screen I am trying to create is basically a "search" screen, and the search filters are passed as json within the query string to the controller. We have the possibility for a lot of search filters being entered, and when the list gets too long, we get an error saying "Request filtering is configured on the Web server to deny the request because the query string is too long". My question is there another way to use DatasourceUrl or to call an MVC controller method without passing these values in the query string? Can we change the method to be an HttpPost so we can just pass the data, but not as part of the query string?

 

Right now the MVC controller method has the [GridDataSourceAction] attribute. If I add the [HttpPost] attribute it doesn't work any more (can't find the method).

Parents Reply Children