DeviceSpecificChoiceCollection 클래스

정의

주의

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.

DeviceSpecific 클래스의 선택 항목 컬렉션을 나타냅니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

public ref class DeviceSpecificChoiceCollection : System::Web::UI::MobileControls::ArrayListCollectionBase
public class DeviceSpecificChoiceCollection : System.Web.UI.MobileControls.ArrayListCollectionBase
[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 DeviceSpecificChoiceCollection : System.Web.UI.MobileControls.ArrayListCollectionBase
type DeviceSpecificChoiceCollection = class
    inherit ArrayListCollectionBase
[<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 DeviceSpecificChoiceCollection = class
    inherit ArrayListCollectionBase
Public Class DeviceSpecificChoiceCollection
Inherits ArrayListCollectionBase
상속
DeviceSpecificChoiceCollection
특성

예제

다음 코드 예제를 사용 하는 방법을 보여 줍니다는 DeviceSpecificChoiceCollection 클래스는 DeviceSpecific/Choice 구문의 선택 항목에 액세스할 수 있습니다. 사용자 편의 위해 필터를 포함 하는 Web.config 파일을 예제 코드를 따릅니다.

참고

다음 코드 샘플 단일 파일 코드 모델을 사용 하 고 코드 숨김 파일에 직접 복사 하는 경우 제대로 작동 하지 않을 수 있습니다. 이 코드 샘플.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" %>
<%@ Import Namespace="System.Web.Mobile" %>

<script runat="server">
    public void Page_Load(Object sender, EventArgs e)
    {
        int count = this.Panel1.DeviceSpecific.Choices.Count;

        // Cycle through the DeviceSpecificChoiceCollection.
        for (int i = 0; i < count; i++)
        {
            string txt1 = "Choice {0} has {1} Templates. ";
            string txt2 = "Filter name is '{0}'. ";

            Label1.Text += String.Format(txt1, i,
                Panel1.DeviceSpecific.Choices[i].Templates.Count);
            Label2.Text += String.Format(txt2,
                Panel1.DeviceSpecific.Choices[i].Filter);
        }
    }

    //<Snippet3>
    // Add a DeviceSpecificChoice section programatically
    protected void form1_Init(object sender, EventArgs e)
    {
        DeviceSpecific devSpecific = Panel1.DeviceSpecific;
        DeviceSpecificChoice devChoiceHtml = new DeviceSpecificChoice();
        devChoiceHtml.Filter = "isCHTML10";
        devSpecific.Choices.Add(devChoiceHtml);
        ((IParserAccessor)form1).AddParsedSubObject(devSpecific);
    }
    //</Snippet3>
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:Form ID="form1" Runat="server" OnInit="form1_Init">
        <mobile:Panel id="Panel1" Runat="server">
            <mobile:DeviceSpecific Runat="server">
                <Choice Filter="isHTML32">
                    <ContentTemplate>
                        <!-- For HTML Browsers -->
                        <br />
                        <mobile:Label ID="Label3" Runat="server" 
                            Text="Visible in an HTML Browser" />
                        <br />
                    </ContentTemplate>
                </Choice>
                <Choice Filter="isWML11">
                    <ContentTemplate>
                        <!-- For WML Browsers -->
                        <br />
                        <mobile:Label ID="Label4" Runat="server" 
                            Text="Viewable in a WML browser" />
                        <br />
                    </ContentTemplate>
                </Choice>
            </mobile:DeviceSpecific>
        </mobile:Panel>
        <mobile:Label id="Label1" Runat="server" Font-Bold="true" />
        <mobile:Label ID="Label2" Runat="server" Font-Bold="true" />
    </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" %>
<%@ Import Namespace="System.Web.Mobile" %>

<script runat="server">
    Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim count As Integer = Panel1.DeviceSpecific.Choices.Count
        Dim i As Integer
        
        ' Cycle through the DeviceSpecificChoiceCollection.
        For i = 0 To count - 1
            Dim txt1 As String = "Choice {0} has {1} Templates. "
            Dim txt2 As String = "Filter name is '{0}'. "
            
            Label1.Text &= String.Format(txt1, i, _
                Panel1.DeviceSpecific.Choices(i).Templates.Count)
            Label2.Text &= String.Format(txt2, _
                Panel1.DeviceSpecific.Choices(i).Filter)
        Next
    End Sub
    
    '<Snippet3>
    ' Add a DeviceSpecificChoice section programatically
    Protected Sub form1_Init(ByVal sender As Object, ByVal e As EventArgs)
        Dim devSpecific As DeviceSpecific = Panel1.DeviceSpecific
        Dim devChoiceHtml As DeviceSpecificChoice = New DeviceSpecificChoice()
        devChoiceHtml.Filter = "isCHTML10"
        devSpecific.Choices.Add(devChoiceHtml)
        CType(form1, IParserAccessor).AddParsedSubObject(devSpecific)
    End Sub
    '</Snippet3>
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:form id="form1" runat="server">
        <mobile:Panel id="Panel1" Runat="server">
            <mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
                <Choice Filter="isHTML32">
                    <ContentTemplate>
                        <!-- For HTML Browsers -->
                        <br />
                        <mobile:Label ID="Label3" Runat="server" 
                            Text="Visible in an HTML Browser" />
                        <br />
                    </ContentTemplate>
                </Choice>
                <Choice Filter="isWML11">
                    <ContentTemplate>
                        <!-- For WML Browsers -->
                        <br />
                        <mobile:Label ID="Label4" Runat="server" 
                            Text="Viewable in a WML browser" />
                        <br />
                    </ContentTemplate>
                </Choice>
            </mobile:DeviceSpecific>
        </mobile:Panel>
        <mobile:Label id="Label1" Runat="server" Font-Bold="true" />
        <mobile:Label ID="Label2" Runat="server" Font-Bold="true" />
    </mobile:form>
</body>
</html>

설명

에 액세스 하는 Choices 의 속성을 DeviceSpecific 검색 개체는 DeviceSpecificChoiceCollection 개체. 이 컬렉션을 구현 합니다 ICollection 인터페이스 (통해를 ArrayListCollectionBase 개체);의 모든 메서드와 속성을 구현 하는 ICollection 인터페이스입니다.

속성

All
사용되지 않음.

컬렉션에서 DeviceSpecificChoice 개체의 배열을 검색합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

Count
사용되지 않음.

컬렉션의 요소 수를 반환합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

(다음에서 상속됨 ArrayListCollectionBase)
IsReadOnly
사용되지 않음.

컬렉션이 읽기 전용인지 여부를 나타내는 값을 가져옵니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

(다음에서 상속됨 ArrayListCollectionBase)
IsSynchronized
사용되지 않음.

컬렉션이 동기화되는지 여부를 나타내는 값을 가져옵니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

(다음에서 상속됨 ArrayListCollectionBase)
Item[Int32]
사용되지 않음.

컬렉션의 DeviceSpecificChoice 항목을 인덱스별로 반환합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

Items
사용되지 않음.

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

(다음에서 상속됨 ArrayListCollectionBase)
SyncRoot
사용되지 않음.

컬렉션에 대한 SyncRoot 개체를 반환합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

(다음에서 상속됨 ArrayListCollectionBase)

메서드

Add(DeviceSpecificChoice)
사용되지 않음.

컬렉션의 끝에 DeviceSpecificChoice 개체를 추가합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

AddAt(Int32, DeviceSpecificChoice)
사용되지 않음.

컬렉션에서 index 매개 변수에 지정된 위치에 선택 항목을 추가합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

Clear()
사용되지 않음.

컬렉션을 지웁니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

CopyTo(Array, Int32)
사용되지 않음.

지정된 인덱스에서 시작하여 컬렉션의 항목을 배열에 복사합니다. 내부 전용입니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

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

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

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

컬렉션의 열거자를 검색합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

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

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

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

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

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

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

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

지정된 선택 항목을 제거합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

RemoveAt(Int32)
사용되지 않음.

지정된 인덱스에서 항목을 제거합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

ToString()
사용되지 않음.

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

(다음에서 상속됨 Object)

확장 메서드

Cast<TResult>(IEnumerable)
사용되지 않음.

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)
사용되지 않음.

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)
사용되지 않음.

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)
사용되지 않음.

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보