PagerPosition 열거형

정의

페이지가 매겨진 컨트롤 내의 다양한 페이지에 액세스하기 위한 호출기 위치를 지정합니다.

public enum class PagerPosition
public enum PagerPosition
type PagerPosition = 
Public Enum PagerPosition
상속
PagerPosition

필드

Bottom 0

컨트롤 아래쪽에 있는 호출기입니다.

Top 1

컨트롤 위쪽에 있는 호출기입니다.

TopAndBottom 2

컨트롤 위쪽과 아래쪽 모두에 있는 호출기입니다.

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 PagerPosition 호출기 맨 아래에 표시 되어야 함을 지정 하는 열거형을 FormView 컨트롤입니다.


<%@ 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>

<%@ Page language="VB" %>

<!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>

설명

페이지 매김을 지 원하는 컨트롤 이라는 컨트롤 내에서 페이지를 탐색할 수 있는 페이저 컨트롤 집합을 제공 합니다. PagerPosition 열거형 호출기 표시 될 수 있는 다른 위치를 나타냅니다.

적용 대상

추가 정보