已经使用相同的参数类型定义了一个名为"Page_Load"的成员 [英] already defines a member called 'Page_Load' with the same parameter types

查看:428
本文介绍了已经使用相同的参数类型定义了一个名为"Page_Load"的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是vijayadurga,我在程序中遇到错误,
错误5类型付款"已经定义了具有相同参数类型的名为"Page_Load"的成员


如何解决该程序

this is vijayadurga, I got an error in program,
Error 5 Type ''payment'' already defines a member called ''Page_Load'' with the same parameter types


how to solve this program

推荐答案


您添加的每个页面都会根据您的文件夹结构自动配置为名称空间.我没有看到足够的代码和结构,但是您确定没有两次定义Page_Load吗?至少错误消息是这样说的.即使您使用与_Default不同的类名,它的行为也一样吗?

编辑后:

您有两个具有相同类名"payment"的aspx文件.在处理asp.net中的文件时,您应该在aspx.cs文件中重命名文件名和类名.
祝一切顺利.
--mit
Hi,
Every page you add is automatically configured to namespace depending on your folder structure. I don''t see enough code and structure, but are you sure, that you don''t have the Page_Load defined twice? At least the error message says so. Does it behave same even when you use different class name than _Default ?

After edits:

You are having two aspx files with same class name "payment". While coping the files in asp.net you should rename the file names as well as class names in aspx.cs file.
All the best.
--Amit


您又定义了一个付款",
搜索,然后重命名
you defined one more "payment",
search ,and rename


这篇关于已经使用相同的参数类型定义了一个名为"Page_Load"的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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