The PageIndex property of a C1Pager control can be used to determine which button will be selected at run time. The following topic shows you how to set this property in Design view, in Source view, and in code.
In Design View
In the Properties window, locate the PageIndex property and set its value. For this example, set it to "1".
In Source View
In Source view, add PageIndex="[Value]"
to the <cc1:C1Pager>
tag. For this example, enter PageIndex="1"
so that the markup resembles to following:
<cc1:C1Pager ID="C1Pager1" runat="server" PageIndex="1">
In Code View
To change the selected index for example, to "1" - add the following code to the Page_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1Pager1.PageIndex = 1 |
To write code in C#
C# |
Copy Code
|
---|---|
C1Pager1.Index = 1; |
This topic illustrates the following:
At run time, the second page in the series will be selected, such as in the following graphic: