1

这就是我按 F5 时得到的……有什么想法吗?我完全不确定这里出了什么问题。

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 9:  
Line 10: 
Line 11: public partial class _Default : System.Web.UI.Page
Line 12: {
Line 13:     protected void Page_Load(object sender, EventArgs e)

 <%@ Page Language="C#"  AutoEventWireup="true" 
     CodeFile="Default.aspx.cs" Inherits="Default" %>
4

1 回答 1

2

行,<%@ Page ... Inherits="Default" %>

不匹配class _Default

将第一行更改为<%@ Page ... Inherits="_Default" %>

于 2012-09-18T20:33:16.640 回答