为了账号安全,请及时绑定邮箱和手机立即绑定

public ActionResult Index()

return Content("Hello From test index")'

CS0103:当前上下文不存在名称“Content  ”

正在回答

1 回答

我找到原因了,Test类名后面直接加上Controller后缀,写成public class TestController,才会有这种错误提示,在类的名后直接继承Controller就没有错误提示了。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
打造你的第一个ASP.NET5 MVC网站应用
  • 参与学习       18806    人
  • 解答问题       193    个

熟练掌握ASP.Net 5 MVC的开发原则与使用方式

进入课程

public ActionResult Index()

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信