gpt4 book ai didi

asp.net - 成员名称不能与其封闭类型相同

转载 作者:行者123 更新时间:2023-12-01 09:38:36 25 4
gpt4 key购买 nike

当我尝试在 Visual Studio 2008 中运行 Web 应用程序时.. 我收到此错误...

'PopupWindow': member names cannot be the same as their enclosing type

在纠正错误的同时,我的启动网页也发生了变化..不知道如何挫败原来的启动网页...

public partial class PopupWindow {
/// <summary>
/// frmPopupWindow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm frmPopupWindow;
/// <summary>
/// PopupWindow1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Sdi.Pss.WebControls.Control PopupWindow;
}

最佳答案

您在名为 PopupWindow 的类中有一个名为 PopupWindow 的字段。只是不要那样做。将字段名称更改为其他名称。

不知道为什么这会影响您的启动网页...通常我只是在获得要突出显示的页面时按 F5 :) 您可以在项目属性的“Web”部分中指定它不过。

关于asp.net - 成员名称不能与其封闭类型相同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3528786/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com