J'ai un GridView et maintenant je ne veux pas recharger une méthode quand la page suivante est utilisée. Ceci est mon GridView, comme vous pouvez le voir, il existe une méthode pour onPageIndexChanging. Est-ce ainsi que je dois le faire?Comment recharger une méthode lors de la modification d'une autre page dans un gridview ASP.NET
<asp:GridView ID="grdvProductChurn" runat="server" CellPadding="4" HeaderStyle-BorderStyle="None"
BorderColor="#666666" BorderStyle="Solid" AllowPaging="True" AutoGenerateColumns="false" PageSize="30" DataSourceID="DataSource_ProductChurn"
AllowSorting="True" ForeColor="#666666" CellSpacing="1" DataFormatString="{0:###,###,###,###,###}"
CaptionAlign="Left" Width="960px" HeaderStyle-HorizontalAlign="Center" HorizontalAlign="Center" CssClass="GridView2"
Height="119px" OnRowCreated="grdvProductChurn_RowCreated" OnPageIndexChanging="gridView_PageIndexChanging" >
Et c'est le codebehind:
protected void gridView_PageIndexChanging()
{
grdvProductChurn_DataBound();
}
Il obtient une erreur du compilateur CS0123.