我有错,请帮助我解决错误 [英] I have an erreor please help me to solve thi error

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

问题描述

编译错误
说明:编译服务该请求所需的资源期间发生错误.请查看以下特定的错误详细信息,并适当地修改您的源代码.

编译器错误消息:CS0111:类型"_Default"已经定义了具有相同参数类型的名为"Page_Load"的成员

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: CS0111: Type ''_Default'' already defines a member called ''Page_Load'' with the same parameter types

Source Error:
Line 11: public partial class _Default : System.Web.UI.Page
Line 12: {
Line 13:     protected void Page_Load(object sender, EventArgs e)
Line 14:     {
Line 15: 



嘿,遇到这种类型的错误,请给我解决方案



hey m getting this type of error plz give me solution

推荐答案

查看错误消息:
Look at the error message:
Type '_Default' already defines a member called 'Page_Load' with the same parameter types


现在查看您的代码-您将找到至少两个版本的Page_Load方法.将它们组合或删除,直到只有一个为止.


Now look at your code - you will find at least two versions of the Page_Load" method. Combine them, or delete until you only have the one.


除了解决方案1之外,
1)您将在页面后面的代码中找到"Page_Load"方法.例如,如果您的页面名称是"A.aspx",那么后面的代码将是"A.aspx.cs".

2)当您在文件后面的代码中时,按Ctrl + F,然后您将看到查找"对话框并键入"Page_Load",然后按Enter.
3)现在,请按照解决方案1中的说明进行操作.

希望对您有所帮助:)
In addition to the solution 1,
1) you will find the "Page_Load" method in the code behind of your page. For example, if your page name is "A.aspx" then the code behind will be "A.aspx.cs".

2) While you are in the code behind file hit the Ctrl + F then you will see the Find Dialog and type "Page_Load" and hit enter.

3) Now follow the instruction mentioned in the Solution 1 please.

Hope it helps :)


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

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