【问题标题】:ASP.NET CS1061 missing definition error inside of WizardASP.NET CS1061 在向导中缺少定义错误
【发布时间】:2011-03-30 16:17:11
【问题描述】:

这是我在第 86 行

遇到的错误

CS1061:“ASP.tabs_profile_vieweditprofile_aspx”不包含 'Wizard1_FinishButtonClick' 的定义并且没有扩展方法 'Wizard1_FinishButtonClick' 接受类型的第一个参数 'ASP.tabs_profile_vieweditprofile_aspx' 可以找到(你是 缺少 using 指令或程序集引用?)

Line 84: </asp:Content>
Line 85: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
Line 86:     <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Height="511px" 
Line 87:     StartNextButtonText="Edit Info" DisplaySideBar="False" 
Line 88:         FinishCompleteButtonText="Save" 

我在 CS 类中确实有我的按钮的方法。有什么建议吗?!?

protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
{
 
}

源代码。

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Height="511px" 
StartNextButtonText="Edit Info" DisplaySideBar="False" 
    FinishCompleteButtonText="Save" 
    style="text-align: center; position: relative; top: 0px; left: 95px; width: 670px;" 
    onfinishbuttonclick="Wizard1_FinishButtonClick">

【问题讨论】:

    标签: c# asp.net visual-studio aspwizard


    【解决方案1】:

    您的 .ascx 和 .ascx.cs 命名空间不匹配 - 这是一个常见错误。确保您的 Inherits 命名空间与 .cs 文件中的命名空间相匹配。这可能就是这里的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-14
      • 2011-08-21
      • 2023-03-20
      • 2018-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多