I have assigned some values to session and wants to access in jquery method , but i am getting null in session.
public ActionResult SaveData(string Idpro,string IdDescription)
{
//some operation here
Session["UserNameDateTime"] = Product.Updated + " " + Product.DateModified;
return null;
}
$.ajax({
url: '@Url.Action("SaveData")' + '?Idpro=' + ProductId + '&IdDescription=' + Description + '&def=' + def,
success: function (result) {
$('#modal-container').modal("hide");
var userNamePassword = '@Session["UserNameDateTime"]';
}
});
Please help ....