调试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
答案 0 :(得分:0)
BasePage是什么命名空间? 我不太确定如何让ASP.NET从常规目录中的源文件中查找类。我通常通过将我想以这种方式访问的类移动到App_Code中来解决这个问题。确保给它一个命名空间并导入它。