Live Chat Icon For mobile
Live Chat Icon

Why do I get error message ‘NewPageIndex is not a member of ‘System.EventArgs’.’

Platform: ASP.NET| Category: DataGrid

You probably declared the event handler for OnPageIndexChanged event incorrectly. Make sure that the event handler looks like the following.


<asp:DataGrid id='DataGrid1' runat='server'... OnPageIndexChanged='<EventName>'.../>

VB.NET


protected Sub <Eventname>(ByVal source As Object, ByVal e  As System.Web.UI.WebControls.DataGridPageChangedEventArgs)  
’...
end sub

C#


protected void <EventName>(object sender , System.Web.UI.WebControls.DataGridPageChangedEventArgs)
{
//...
}

Share with

Share on twitter
Share on facebook
Share on linkedin