System.Web.UI.WebControls Namespace GridViewPageEventArgs Class
.NET Framework version 2.0
Initializes a new instance of the GridViewPageEventArgs class.
[ VB ]
Public Sub New ( _
ByVal commandSource As Object, _
ByVal newPageIndex As Integer _
)
[ C# ]
public GridViewPageEventArgs (
object commandSource,
int newPageIndex
);
[ C++ ]
public: GridViewPageEventArgs (
Object* commandSource,
int newPageIndex
);
[ JScript ]
public function GridViewPageEventArgs (
commandSource : Object,
newPageIndex : int
);
- commandSource
- The source of the command.
- newPageIndex
- The index of the page selected by the user from the page selection element of the GridView control.
Use this constructor to initialize a new instance of the GridViewPageEventArgs class.
When an instance of GridViewCommandEventArgs is created by a call to this constructor, the following properties are initialized to the specified values.
Properties |
Initial Value |
CommandSource |
The commandSource parameter. |
NewPageIndex |
The newPageIndex parameter. |
The following example demonstrates how to initialize a new instance of the GridViewPageEventArgs class.
void myPageChangedHandler ( Object src, GridViewPageEventArgs e ) {
GridViewPageEventArgs args = new GridViewPageEventArgs (
e.CommandSource, e.NewPageIndex );
}
Sub myPageChangedHandler ( Byval src As Object, e As GridViewPageEventArgs )
Dim args As New GridViewPageEventArgs (
e.CommandSource, e.NewPageIndex )
End Sub |
|
C# |
VB |
GridViewPageEventArgs Members