LoadItemsEventArgs 클래스

정의

주의

The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.

사용자 지정 페이지 매김을 지원하는 ASP.NET 모바일 컨트롤에 대한 이벤트 데이터를 제공합니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

public ref class LoadItemsEventArgs : EventArgs
public class LoadItemsEventArgs : EventArgs
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class LoadItemsEventArgs : EventArgs
type LoadItemsEventArgs = class
    inherit EventArgs
[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]
type LoadItemsEventArgs = class
    inherit EventArgs
Public Class LoadItemsEventArgs
Inherits EventArgs
상속
LoadItemsEventArgs
특성

예제

다음 코드 예제에서는 하는 방법을 OnLoadItems 함수를 호출 하는 이벤트 LoadNow합니다. ItemIndex 속성 목록에 바인딩되는 배열에 추가할 항목의 수를 결정 합니다. 이 예의 결과 표시 하려면 목록 페이지를 매길 수 있는 디바이스에서 페이지를 검토 해야 합니다.

참고

다음 코드 샘플 단일 파일 코드 모델을 사용 하 고 코드 숨김 파일에 직접 복사 하는 경우 제대로 작동 하지 않을 수 있습니다. 이 코드 샘플.aspx 확장명이 있는 빈 텍스트 파일에 복사 해야 합니다. 자세한 내용은 ASP.NET Web Forms 페이지 코드 모델합니다.

<%@ Page Language="C#" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>

<script runat="server">
    // Called by the List whenever it needs new items
    private void LoadNow(object sender, LoadItemsEventArgs e)
    {
        int j = e.ItemIndex;
        int estItemSize = 110;

        // Get the optimum page weight for the device
        int wt = Form1.Adapter.Page.Adapter.OptimumPageWeight;
        // Get the number of items per page
        List1.ItemsPerPage = wt / estItemSize;
 
        // Clear the current items
        List1.Items.Clear();

        // Build a section of the array
        ArrayList arr= new ArrayList();
        for (int i = 1; i <= e.ItemCount; i++)
        {
            int v = i + j;
            arr.Add((v.ToString() + " List Item"));
        }

        // Assign the array to the list
        List1.DataSource = arr;
        List1.DataBind();
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:Form id="Form1" runat="server" Paginate="true">
        <mobile:List id="List1" runat="server" 
            ItemCount="200" onLoadItems="LoadNow" />
    </mobile:Form>
</body>
</html>
<%@ Page Language="VB" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>

<script runat="server">
    ' Called by the List whenever it needs new items
    Private Sub LoadNow(ByVal sender As Object, _
        ByVal e As LoadItemsEventArgs)
        
        Dim i, j As Integer
        i = 0
        j = e.ItemIndex
        Dim estItemSize As Integer = 110

        ' Get the optimum page weight for the device
        Dim wt As Integer = _
            form1.Adapter.Page.Adapter.OptimumPageWeight
        ' Get the number of items per page
        List1.ItemsPerPage = wt / estItemSize

        ' Clear the current items
        List1.Items.Clear()
        
        ' Build a section of the array
        Dim arr As New ArrayList()
        For i = 1 To e.ItemCount
            arr.Add(j + i)
        Next
        
        ' Assign the array to the list
        List1.DataSource = arr
        List1.DataBind()
    End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:form id="form1" runat="server" Paginate="true">
        <mobile:List id="List1" runat="server" 
            ItemCount="200" onLoadItems="LoadNow" 
            ItemsPerPage="8" />
    </mobile:form>
</body>
</html>

설명

클래스 LoadItemsEventArgs 개체는 요청 시 컨트롤로 로드할 항목에 대 한 정보를 사용 하 여 이벤트 데이터를 제공 합니다.

생성자

LoadItemsEventArgs(Int32, Int32)
사용되지 않음.

LoadItemsEventArgs 클래스의 새 인스턴스를 초기화합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

속성

ItemCount
사용되지 않음.

컨트롤의 항목 수를 가져오거나 설정합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

ItemIndex
사용되지 않음.

호출된 이벤트에서 로드할 첫 번째 항목의 인덱스를 가져옵니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

메서드

Equals(Object)
사용되지 않음.

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()
사용되지 않음.

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()
사용되지 않음.

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()
사용되지 않음.

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()
사용되지 않음.

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보