---
title: "AJAX Sending Null data when using IE"  
description: "AJAX Sending Null data when using IE"  
author: "Anonymous User"  
published: 2013-12-23  
updated: 2013-12-23  
canonical: https://www.mindstick.com/forum/1836/ajax-sending-null-data-when-using-ie  
category: "javascript"  
tags: ["javascript"]  
reading_time: 2 minutes  

---

# AJAX Sending Null data when using IE

When I use an [AJAX request](https://www.mindstick.com/forum/157891/what-is-the-role-of-the-jsonresult-class-in-mvc-how-can-it-use-to-return-data-to-an-ajax-request) that sends data to [controller](https://www.mindstick.com/blog/273/passing-values-from-controller-to-view-in-asp-dot-net-mvc) with IE, it is sending null data. When I use Chrome or Firefox, my data from the key/value pairs are there in the controller's parameter [variables](https://www.mindstick.com/articles/715/php-variables).

**Here is my [javascript function](https://www.mindstick.com/forum/2090/send-data-from-asp-dot-net-code-behind-to-a-javascript-function):**

```
$(".input-group.date").datepicker({        autoclose: true    }).on('changeDate', function (ev) {        var schoolId = $(this).attr('data-schoolId');        var date = new Date(ev.date).toUTCString();        var schoolName = $(this).attr('data-schoolName');        $.ajax({            url: "@Url.Action("ChangeFulfillmentDate", "Admin")",            type: "POST",            data: {                'newDate': date,                'schoolId': schoolId            },            success: function (data) {                if (!data.success) {                    var n = noty({                        text: 'Hold up! Something went wrong...<br />' + data.message,                        layout: 'top',                        type: 'error',                        killer: true,                        closeWith: ['button']                    });                }                else {                    var n = noty({                        text: 'Fulfillment date for ' + schoolName + ' updated successfully',                        layout: 'bottomRight',                        type: 'success',                        timeout: 3000,                        killer: true,                        closeWith: ['hover']                    });                }            },            error: function (xhr, status, error) {                var n = noty({                    text: 'Hold up! Something went wrong...<br />' + xhr.responseText,                    layout: 'top',                    type: 'error',                    killer: true,                    closeWith: ['button']                });            }        });    });
```

The ajax response error I get is:

The [parameters](https://www.mindstick.com/articles/87/passing-parameters-in-c-sharp) [dictionary](https://www.mindstick.com/articles/1500/hashtable-and-dictionary-in-c-sharp) contains a null entry for parameter 'newDate' of non-nullable type 'System.DateTime' for method 'System.Web.Mvc.JsonResult ChangeFulfillmentDate(System.DateTime, Int32)' in 'CurrReplenishment.Controllers.AdminController'. An [optional parameter](https://www.mindstick.com/interview/1310/how-do-i-simulate-optional-parameters-to-com-calls) must be a [reference type](https://www.mindstick.com/interview/235/what-is-difference-between-value-types-and-reference-types-in-vb-dot-net-or-c-sharp-value-types-vs-reference-types), a nullable type, or be [declared as](https://www.mindstick.com/interview/2711/what-if-the-main-method-is-declared-as-private) an optional parameter.

## Parameter name: parameters

Why is my AJAX call not sending the proper values for the key/value pairs? I have made sure that there is data in those javascript variables, as it works in Chrome and Firefox.

## Replies

### Reply by Pravesh Singh

Hi Ben,

It seems that ev.date is the problem, why don't you try something like this:

```
   
$(".input-group.date").datepicker({        autoclose:true,        onSelect:
function(selected) {            var date =new Date(selected);            /* Do something */        }    });
```


---

Original Source: https://www.mindstick.com/forum/1836/ajax-sending-null-data-when-using-ie

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
