asp.net 中mvc return Content("ok") ;return View() return JSon()区别


return Content("xx") 就是简单的返回xx字符串 常用语与校验 Add,Delete,Update等操作

return View() 无参数就是默认返回View层中index界面(html文本) return ("demo") 就是返回该控制器下生成的View层中的demo界面

return Json()就是返回json字符串


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM