3
How do I send to View()
of my Controller in Json format, the default formatted date dd-MM-yyyy hh:mm:ss
?
In the transport of data between View and Controller I am using AJAX.
public ActionResult GetList(Object abc) {
...
ObjEntity temp = methodGetInDB();
string valueJson = new JavaScriptSerializer().Serialize(temp);
//Saída temp: "Date":"\/Date(1483290061000)\/"
}
there are other ways like in the post: http://stackoverflow.com/questions/18635599/specifying-a-custom-datetime-format-when-serializing-with-json-net
– Claudio Sally
Thanks for the indication, it worked great here !!! =)
– Darlan Soares