다음을 통해 공유


FilterableAttribute.Filterable 속성

정의

특성이 적용되는 속성이 디바이스 필터링을 FilterableAttribute 지원하는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool Filterable { bool get(); };
public bool Filterable { get; }
member this.Filterable : bool
Public ReadOnly Property Filterable As Boolean

속성 값

true특성이 적용되는 속성이 디바이스 필터링을 지원함을 나타내려면 입니다. 그렇지 않으면 . false

예제

다음 코드 예제에서는 속성이 디바이스 필터링을 지원하지 않음을 나타내기 위해 사용자 지정 컨트롤의 속성에 특성을 적용 FilterableAttribute 하는 방법을 보여 줍니다.


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Samples.AspNet.CS.Controls
{
    public class SimpleCustomControl : WebControl
    {
        private string _productID;

        // Set Filterable attribute to specify that this
        // property does not support device filtering.
        [Bindable(true)]
        [Filterable(false)]
        public string ProductID
        {
            get
            {
                return _productID;
            }
            set
            {
                _productID = value;
            }
        }
    }
}

Imports System.ComponentModel
Imports System.Web.UI

Namespace Samples.AspNet.VB.Controls

    Public Class SimpleCustomControl
        Inherits System.Web.UI.WebControls.WebControl

        Dim _productID As String

        ' Set Filterable attribute to specify that this
        ' property does not support device filtering.
        <Bindable(True), Filterable(False)> Property ProductID() As String
            Get
                Return _productID
            End Get

            Set(ByVal Value As String)
                _productID = Value
            End Set
        End Property
    End Class

End Namespace

설명

속성을 사용하여 특성이 Filterable 적용되는 속성이 디바이스 필터링을 FilterableAttribute 지원하는지 여부를 확인합니다. 속성이 디바이스 필터링을 지원하는 경우 디바이스 필터를 지정하여 특정 디바이스에 대한 속성 값을 재정의할 수 있습니다. 자세한 내용은 특정 디바이스에 대한 사용자 지정을 참조하세요.

적용 대상

추가 정보