后来查了下资料,发现要把所有aspx代码的 Inherits="页面名" 改成 Inherits="命名空间.页面名" 就OK了。 转载于:https://www.cnblogs.com/daohuen/archive/2008/06/16/1223170.html