This documentation is archived and is not being maintained.
PagerPosition Enumeration
Visual Studio 2008
Specifies the position of the pager for accessing various pages within a paginated control.
Assembly: System.Web (in System.Web.dll)
The following code example demonstrates how to use the PagerPosition enumeration to specify that the pager should be displayed at the bottom of a FormView control.
<%@ Page language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>FormView AllowPaging Example</title> </head> <body> <form id="form1" runat="server"> <h3>FormView AllowPaging Example</h3> <asp:formview id="EmployeeFormView" datasourceid="EmployeeSource" allowpaging="true" datakeynames="EmployeeID" runat="server"> <pagersettings mode="Numeric" position="Bottom"/> <pagerstyle backcolor="LightBlue" horizontalalign="Center"/> <itemtemplate> <table> <tr> <td> <asp:image id="EmployeeImage" imageurl='<%# Eval("PhotoPath") %>' alternatetext='<%# Eval("LastName") %>' runat="server"/> </td> <td> <h3><%# Eval("FirstName") %> <%# Eval("LastName") %></h3> <%# Eval("Title") %> </td> </tr> </table> </itemtemplate> </asp:formview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:sqldatasource id="EmployeeSource" selectcommand="Select [EmployeeID], [LastName], [FirstName], [Title], [PhotoPath] From [Employees]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"/> </form> </body> </html>
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: