Tuesday 15 February 2011

asp.net mvc - Can not parse datatable ajax request -


I am currently trying to use JQuery Datatables in my project. It seems to work very well, but there is a problem in processing the Ajax request to delete a line.

Ajax request sent by the DataTable Editor plugin is formatted:

action = remove & amp; Table = pzeIpMaster & amp; Id = & amp; Data% 5B% 5D = 3

looks like the method in the controller

    

  • data = zero
  • id = ""
  • P> Why is data set to blank? !! In my opinion, data {3}

    to help you thx

    data% 5b% 5D decode data [] then MVC data [with yor data parameter] can not match.

    You can try:

      [Authorize, http post] Public Action Result Onlinelight Piezmaster (String Action, String Table, String ID) {var data = this .Request.Form ["data []"]; }   

    Or you can write a model builder like this



  • No comments:

    Post a Comment