asp.net - asp.net C#编译器错误CS1061

我在我的大学项目社交网站上工作.....听到一些严重问题....
->当我拖动下拉按钮或图像按钮时,该页面很容易运行,但是双击aspx.cs页面后打开,则没有代码显示该页面CS1061-error。

点击按钮后生成点击事件...。

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)
        {

        }
    }
}

->在任何类中没有任何 namespace ...或任何代码....为什么浏览器显示此消息

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的新手...我浪费了更多时间寻找解决方案...

我尝试了所有方法来解决问题..但是这仍然让我感到尴尬。

最佳答案

我认为如果您重建应用程序可以解决此问题

如果使用任何ASP控件,则必须重新部署应用程序或Web应用程序以将相关的dll文件定位到bin文件夹中。

祝好运

https://stackoverflow.com/questions/15506087/

相关文章:

visual-c++ - 如何针对VES2008编译Greta?

perl - "error: variable length array of non-POD el

android - 如何解决java.lang.NoClassDefFoundError

windows - Windows上的powerpc编译器给出 “c++ compiler not

xcode - Intel C++编译器,无法在OS X上打开stdarg.h

android - 如何解决Java Eclipse中的 “The hierarchy of the

perl - 无法编译我的 perl 脚本。让一切正常工作的最简单方法是什么?

compiler-construction - 未定义对ruserok错误的引用

vba - 具有多个条件的Select Case函数不循环

compiler-errors - 错误: no newline at end of file [-