开发者

Pass object using JSON

开发者 https://www.devze.com 2023-01-01 06:09 出处:网络
right now i am using Json for passing status and message like return Json(new { Success = true, Message = \"Save 开发者_JAVA百科successfully\" });

right now i am using Json for passing status and message like

return Json(new { Success = true, Message = "Save 开发者_JAVA百科successfully" });

 Project model=new Project()

Is there any way, i can send model in json also?

I am using c# and asp.net mvc


Yes - it is very easy. The Json method accepts any object:

return Json(new Project());
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号