【发布时间】:2011-07-24 01:51:18
【问题描述】:
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: CS1061: 'ASP.calculator_aspx' does not contain a definition for 'DisplayBox_TextChanged' and no extension method 'DisplayBox_TextChanged' accepting a first argument of type 'ASP.calculator_aspx' could be found (are you missing a using directive or an assembly reference?)
Source Error:enter code here
Line 18: <tr>
Line 19: <td colspan="5">
Line 20: <asp:TextBox ID="DisplayBox" runat="server"
Line 21: ontextchanged="DisplayBox_TextChanged" Width="268px"></asp:TextBox>
Line 22: </td>
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class calculator : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
【问题讨论】:
-
请提供导致此错误的代码的最小完整示例。
-
对我来说,编译器说我没有方法。我确实有这个方法,但是里面有一些错误。我在编译时忽略了这些错误,它给了我同样的错误消息。我只是评论了那些错误行并再次编译。它奏效了。
标签: c# error-handling