2011-05-01 164 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中來繞過這個問題。確保你給它一個名稱空間並導入它。