<%@ 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
答案 0 :(得分:5)
Inherits需要类的全名,因此您还需要包含命名空间。尝试更换
Inherits="_Default"
with
Inherits="FlashCards._Default"