Server Error in '/asppub' Application. Compilation Error 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.mis3200_unit4_ringu4l2_2_aspx' does not contain a definition for 'cblFees_SelectedIndexChanged' and no extension method 'cblFees_SelectedIndexChanged' accepting a first argument of type 'ASP.mis3200_unit4_ringu4l2_2_aspx' could be found (are you missing a using directive or an assembly reference?)
来源错误:
Line 112: </p>
Line 113: <p>
Line 114: <asp:CheckBoxList ID="cblFees" runat="server"
Line 115: onselectedindexchanged="cblFees_SelectedIndexChanged" RepeatLayout="Flow"
Line 116: ValidationGroup="L2.2">
源文件:c:\Users\Ryan\Desktop\asppub\MIS3200\Unit4\RingU4L2.2.aspx 行:114
最佳答案
您需要在代码后面声明事件处理程序 cblFees_SelectedIndexChanged
,如果您不使用它,只需从 asp:CheckBoxList 中删除
标签。onselectedindexchanged="cblFees_SelectedIndexChanged"
通常 asp:CheckBoxList
不执行 postback
并且不需要 selectedindexchanged
事件。
关于c# - 无法弄清楚我做错了什么 ASP.NET C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21747530/