FilterableAttribute(Boolean) 생성자

정의

FilterableAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 FilterableAttribute(bool filterable);
public FilterableAttribute(bool filterable);
new System.Web.UI.FilterableAttribute : bool -> System.Web.UI.FilterableAttribute
Public Sub New (filterable As Boolean)

매개 변수

filterable
Boolean

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

예제

다음 코드 예제에서는 사용자 지정 컨트롤의 속성에 특성을 적용 FilterableAttribute 하는 방법을 보여 줍니다. 이 생성자는 특성을 나타내는 개체를 만들기 FilterableAttribute 위해 ASP.NET 내부적으로 호출됩니다.


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

설명

이 생성자를 사용하여 클래스의 새 인스턴스를 만듭니다 FilterableAttribute . 다음 표에서는 클래스 인스턴스의 초기 속성 값을 보여 줍니다 FilterableAttribute .

재산 초기 값
Filterable 매개 변수의 값입니다 filterable .

적용 대상

추가 정보