Wrap request parameters as JSON

1 posts, 0 answers
  1. Dima
    Dima avatar
    1 posts
    Member since:
    Oct 2012

    Posted 29 Oct 2012 Link to this post

    Is there any way to wrap request parateters as JSON while using MVC notation for dataSource?

    For example, this grid will send parameters as contentType:application/x-www-form-urlencoded, but I'd like to send them as contentType: application/json.

    In js notation I can use 'parameterMap' and stringify parameters there, but how I may handle this here:

              .Columns(columns =>
                      columns.Bound(p => p.Id);
                      columns.Bound(p => p.Name);
              .DataSource(dataSource => dataSource.Ajax().Read(read => read.Url("Services/DataService.asmx/GetData"))

Back to Top