我工作在我的大学项目社交网站.....有一些关键的问题听到.... - >当我拖动一个下拉按钮或图像按钮那里页面运行很容易但双击它后aspx.cs页面打开没有代码赖特仍然页面显示CS1061-错误。asp.net c#编译器错误CS1061
点击按钮后产生的点击事件....
namespace newsns
{
public partial class WebForm6 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
}
}
}
- >有任何类没有问题的任何命名空间......或任何代码....所以为什么浏览器显示这条消息
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: CS1061: 'ASP.forgotpassword_aspx' does not contain a definition for 'Button1_Click1' and no extension method 'Button1_Click1' accepting a first argument of type 'ASP.forgotpassword_aspx' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 331: Line 332:
Line 333: Text="Button" /> Line 335:Source File: c:\Users\DHAVAL\Documents\Visual Studio 2010\Projects\NEWSNS\newsns\forgotpassword.aspx Line: 333
显示详细的编译器输出:
显示完整的编译来源:
- >那里我的一些页面不能显示这个错误,但其他页面显示它....为什么... ????? 请回答我的问题....我新的C#asp.net ...我失去了我的更多时间来寻找解决方案...
我尝试所有方法来解决问题....但它仍然让我难堪。
“ASPX”文件后面的代码可能没有正确设置。检查ASPX页面顶部的<%@ Page指令中的'CodeBehind'属性。该文件名是否与你的例子中代码的位置相匹配? – 2013-03-19 17:20:54
所有的代码设置正确......文件名,类名,名称空间都匹配正确...当我创建项目一些页面工作很好,但现在添加新页面也相同error.i检查大多数网站相关的这个话题没有一个人可以正确回答它。 – user2154272 2013-03-19 18:43:25
请问您可以粘贴忘记密码.aspx的代码 – 2013-04-13 11:25:10