运行ASP.NET应用程序时编译错误

时间:2011-05-01 21:30:17

标签: asp.net

调试ASP.NET项目时出现此编译错误。如何正确添加参考?

  

Compilation Error

     

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

     

Compiler Error Message: CS0246: The type or namespace name 'BasePage' could not be found (are you missing a using directive or an assembly reference?)

     

Source Error:

     

Line 8: namespace DisplayPage.UI Line 9: { Line 10: public partial class _Default : BasePage Line 11:
{ Line 12: protected void Page_Load(object sender, EventArgs e)

我使用的是.NET 3.5和vs 2008

1 个答案:

答案 0 :(得分:0)

BasePage是什么命名空间? 我不太确定如何让ASP.NET从常规目录中的源文件中查找类。我通常通过将我想以这种方式访问​​的类移动到App_Code中来解决这个问题。确保给它一个命名空间并导入它。

相关问题