2011-03-30 110 views
0

以下是錯誤我得到的線86幫助與嚮導錯誤。 ASP.NET C#

錯誤= 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"> 

回答

0

您的.ascx和.ascx.cs命名空間不匹配 - 這是一個流行的錯誤。確保您的繼承名稱空間匹配.cs文件中的名稱空間。這可能是這裏的問題。