2009-04-26 33 views
0
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 

但是我得到這個錯誤...試圖讓它們匹配,所有東西,它是什麼樣子?有人能告訴我什麼問題與我的課程標題?

Server Error in '/' Application. 
    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: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). 

    Source Error: 

    Line 14: namespace FlashCards 
    Line 15: { 
    Line 16:  public partial class _Default : System.Web.UI.Page 
    Line 17:  { 
    Line 18:   protected int indexKey = 0; 


    Source File: c:\Users\Ryan\documents\visual studio 2008\websites\flashcards\Default.aspx.cs Line: 16 

回答

5

Inherits需要類的全名,所以您還需要包含名稱空間。嘗試更換

Inherits="_Default" 
with 
Inherits="FlashCards._Default" 
+0

優秀答案+1 – 2009-04-26 01:24:13

相關問題