2011-05-01 156 views
0

调试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

+0

BasePage是您定义的类吗? – 2011-05-01 21:33:40

+0

我总是发现,当下面显示它不是说谎... '你是否缺少一个使用指令或程序集引用?' – Ollie 2011-05-01 21:47:45

+0

感谢您的帮助球员。 – gandalfish 2011-05-01 21:50:57

回答

0

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