Вопрос по json, asp.net-mvc, c# – Передача неструктурированного JSON между JQuery и действиями контроллера MVC

1

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededjQuery('.input')Error: User Rate Limit Exceeded

var inputData = my_serialize( $('input');
$.ajax({
  type:'POST',
  url: '/acme/Ajax/CaptureInput',
  dataType: "json",
  data: { inputData: JSON.stringify(inputData) },
  success: Page_Response_RegisterAndDeposit,
  error: Page_AjaxError
});

Error: User Rate Limit Exceeded

public JsonResult CaptureInput(string inputDataAsJsonString)
{
  JavaScriptSerializer JSON = new JavaScriptSerializer();
  object inputData = JSON.DeserializeObject(inputDataAsJsonString);

Error: User Rate Limit ExceededobjectError: User Rate Limit ExceededIDictionary или дажеdynamic.

Error: User Rate Limit Exceeded LukLed
Error: User Rate Limit Exceeded Chris Becke
Error: User Rate Limit Exceededstackoverflow.com/questions/5473156/… stackoverflow.com/questions/5022958/… Chris Moschini

Ваш Ответ

2   ответа
0

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

1

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

public ActionResult CaptureInput(Dictionary<string, string> values)
{
    ...
}

Error: User Rate Limit Exceeded

<script type="text/javascript">
    var values = $('form').serializeArray();
    var data = {};
    $.each(values, function (index, value) {
        data['[' + index + '].key'] = value.name;
        data['[' + index + '].value'] = value.value;
    });

    $.ajax({
        url: '@Url.Action("CaptureInput")',
        type: 'POST',
        contentType: 'application/json',
        data: JSON.stringify(data),
        success: function (result) {
            alert('success');
        }
    });
</script>

Похожие вопросы