2017-01-17 66 views
-2

我調試程序後, 該頁面顯示我以下錯誤。 我不知道解決這個錯誤,是缺少程序集編譯錯誤 - 您是否缺少using指令或程序集引用?

以下是錯誤的顯示:

編譯錯誤

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

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

源錯誤:

<span class="fieldlable">Telco:</span> 
<span> 
<asp:DropDownList ID="ddlTelco" runat="server" DataTextField="Text" DataValueField="Value" AutoPostBack="true" OnSelectedIndexChanged="ddlTelco_SelectedIndexChanged" SelectMethod="LoadTelco" Enabled="false"></asp:DropDownList> 
</span> 
<asp:RequiredFieldValidator ID="RequiredFieldValidatorTelco" runat="server" ErrorMessage="Telco" ControlToValidate="ddlTelco"></asp:RequiredFieldValidator> 
+0

錯誤消息告訴確切的問題是... – VDWWD

回答

0

這意味着它正在尋找的事件ddlTelco_SelectedIndexChanged您訂閱了你的控制

在您的標記背後的代碼,定義事件爲ddlTelco_SelectedIndexChanged或通過訂閱您的控制,以一個事件併產生

ddlTelco.OnSelectedIndexChanged + = ddlTelco_SelectedIndexChanged

protected void ddlTelco_SelectedIndexChanged(object sender, EventArgs e) 
    { 
    //Write implementation here 
    } 

並重建。

1

您分配了事件處理ddlTelco_SelectedIndexChangedOnSelectedIndexChanged事件DropDownList的但是你忘了在後端定義它,或者它可能會被刪除。

如果你真的想要做的事與OnSelectedIndexChanged定義在後端ddlTelco_SelectedIndexChanged重建解決方案。如果你不想辦法從標記刪除OnSelectedIndexChanged

相關問題