shosho s

shosho s

  • NA
  • 137
  • 99.2k

how can i pass datetime value to an action method by ajax

Jul 13 2016 11:06 AM
function PassDateTime(date) {
$.ajax({
url: '@Url.Action("GetClientDateTime")',
data: { ClientSideTimeIn: date },
type: 'GET',
success: function (result) {
},
error: function (request, status, error) {
alert(request.responseText);
}
});
}
 
 im trying to pass the datetime value with the above ajax to an action method but i keep an error say:
 

The parameters dictionary contains a null entry for parameter 'timein' of non-nullable type 'System.DateTime' for method 'System.Web.Mvc.ActionResult GetClientDateTime(System.DateTime)' .....

 
how can i resolve this..please help 


 
 
 

Answers (1)