开发者

ASP.NET CS1061 missing definition error inside of Wizard

开发者 https://www.devze.com 2023-02-20 15:42 出处:网络
Here is the error I get on Line 86 CS1061: \'ASP.tabs_profile_vieweditprofile_aspx\' does not contain a

Here is the error I get on Line 86

CS1061: 'ASP.tabs_profile_vieweditprofile_aspx' does not contain a definition for 'Wizard1_FinishButtonClick' and no extension method 'Wizard1_FinishButtonClick' accepting a first argument of type 'ASP.tabs_profile_vieweditprofile_aspx' could be found (are you missing a using directive or an assembly reference?)

Line 84: </asp:Content>
Line 85: <as开发者_JS百科p: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" 

And I do have the method for my button in the CS class. Any suggestions?!?

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

Source code.

<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">


Your .ascx and .ascx.cs Namespaces won't be matching - it's a popular error. Make sure your Inherits namespace matches the one in the .cs file. That'll likely be the issue here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号