Abdu_Allah
asked on
Why I am getting the following error: 'NewPageIndex' is not a member of 'System.EventArgs'
Why I am getting the following error: 'NewPageIndex' is not a member of 'System.EventArgs'
Here is the code:
Protected Sub GridView1_PageIndexChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.PageIndexChanged
GridView1.PageIndex = e.NewPageIndex
End Sub
Here is the code:
Protected Sub GridView1_PageIndexChanged
GridView1.PageIndex = e.NewPageIndex
End Sub
BTW - The reason you are getting that error is becase NewPageIndex is not a member of 'System.EventArgs', exactly as the error stated. You can only use those members available to a given object.
ASKER
>If you are trying to set the PageIndex, there's no need
Then why GridView paging does not work?!
Then why GridView paging does not work?!
ASKER
What is the alternative of NewPageIndex in ASP.NET 2.0?
In ASP.NET 1.1 NewPageIndex was a member of System.EventArgs.
In ASP.NET 1.1 NewPageIndex was a member of System.EventArgs.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is it you are trying to do? If you are trying to set the PageIndex, there's no need, because it has already been changed. That's why that event was raised.
Regards,
Wayen