编译时出现:请确保此代码文件中定义的类与“inherits”属性匹配,并且该类扩展的基类(例如Page 或UserControl)是正确的。

  编译ASP.NET时,提示请确保此代码文件中定义的类与“inherits属性匹配并且该类扩展的基类(例如Page 或UserControl)是正确的。”想起自己加过namespace,去掉后编译正常,但是我希望加入namespace,解决方式:在ASPX页面中的inherits后加入命名空间的名称,比如原来是inherits="video_index",命名空间为joymo,现在改成inherits="joymo.video_index"即可。
原文地址:https://www.cnblogs.com/freemobile/p/560711.html