可视web devloper中的错误 [英] error in visual web devloper

查看:44
本文介绍了可视web devloper中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

描述:编译服务此请求所需的资源时发生错误。请查看以下具体错误详细信息并正确修改源代码。



编译器错误消息:CS1061:'ASP.main_aspx'不包含'Button1_Click'的定义并且没有扩展方法'Button1_Click'接受类型'ASP.main_aspx'的第一个参数可以找到(你是否缺少using指令或汇编引用?)



来源错误:







第17行:< p>

第18行:& nbsp;& nbsp;& nbsp;& nbsp;

第19行:< asp:Button ID =" Button1" RUNAT = QUOT;服务器" onclick =" Button1_Click"

第20行:style =" height:26px"文本= QUOT确定]; />

第21行:< asp:标签ID =" Label1" RUNAT = QUOT;服务器" Text =" Label">< / asp:Label>

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.main_aspx' does not contain a definition for 'Button1_Click' and no extension method 'Button1_Click' accepting a first argument of type 'ASP.main_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:



Line 17: <p>
Line 18: &nbsp;&nbsp;&nbsp;&nbsp;
Line 19: <asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Line 20: style="height: 26px" Text="ok" />
Line 21: <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

推荐答案

我会删除该按钮并重新添加。它可能已经从设计师那里删除了一些。
I would delete the button and add it again. It may have gotten deleted from the designer some how.


这意味着按钮点击事件 Button1_Click Code Behind 不存在。请添加。
That means the Button Click Event (Button1_Click) is not present at the Code Behind. Please add that.


这篇关于可视web devloper中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆