Possible Duplicate:
Razor-based view doesn't see referenced assemblies編譯器錯誤信息:CS0103:名稱「數據庫」不會在目前情況下
存在我是一個新手在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: CS0103: The name 'Database' does not exist in the current context
Source Error:
Line 1: @{ Line 2: var db = Database.Open("demo"); ' Line 3:
Line 4:Source File: c:\Users\Ayoya\Documents\My Web Sites\demo\Page.cshtml
Line: 2 **
誰能告訴我什麼是錯的? 謝謝
我正在關注W3schools,我第一次看到它是在WebMatrix中時,他們確實做了他們做的 –
。 WebMatrix包含正確的DLL。如果您使用的是其他環境,則可能沒有引用該DLL – codingbiz
是的,我正在使用WebMatrix究竟應該如何包含DLL? –