model view controller - When Passing checkbox values as JSON in Jquery, I get an error: 500 Internal Server -


i want pass checkbox value json, when debugging code error:

networkerror: 500 internal server error - http://localhost:2020/labaccess/labaccesscheck" circular reference detected while serializing object of type 'system.reflection.runtimemodule' 

what's problem? use code in view , control.

$(function () {      $("#getaccess").change(function () {          alert('asa')          var newvalue = true;//$(this).checkbox;          var itemid = '2' ;          alert('ii')          $.ajax({              type: "post",              url: "/labaccess/labaccesscheck",              data: { itemid: '67' },              datatype: "json",              traditional: true,              success: function (data) {                  //alert(data.itemid);                  //alert(data.itemid);              },              error: function (xmlhttprequest, textstatus, errorthrown) {               }          });     });  });    [httppost]         public virtual jsonresult labaccesscheck(string itemid)         {              //int16 id = convert.toint16(tempdata["id"].tostring());             tempdata["fulname"] = _userservice.getfullname(36);              string type = string.empty;             ilist<p_user_get_lab_access_list_result> selected = _ilabaccess.getdatatablebyuser(36, "userid");             //return (partialview(mvc.baseadmin.labaccess.views._listbyuser, selected));              return json(partialview(mvc.baseadmin.labaccess.views._listbyuser, selected),   jsonrequestbehavior.allowget);         } 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -