一切都运行得很顺利,直到我试图在第1000次测试我的chrome页面中的chrome,这次它给了我这个错误,我似乎无法找到什么错误
Compiler Error Message: CS1061: 'default_aspx' does not contain a definition for 'GridView2_SelectedIndexChanged1' and no extension method 'GridView2_SelectedIndexChanged1' accepting a first argument of type 'default_aspx' could be found (are you missing a using directive or an assembly reference?)
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="ISBN" DataSourceID="SqlDataSource2" EmptyDataText="There are no data records to display." OnSelectedIndexChanged="GridView2_SelectedIndexChanged1">
答案 0 :(得分:1)
您需要在后面的代码(default.aspx.cs)文件中为事件GridView2_SelectedIndexChanged1创建一个方法。
protected void GridView2_SelectedIndexChanged1(object sender, GridViewPageEventArgs e)