WebDescriptionAttribute Constructors

Definitie

Initialiseert een nieuw exemplaar van de WebDescriptionAttribute klasse.

Overloads

Name Description
WebDescriptionAttribute()

Initialiseert een nieuw exemplaar van de WebDescriptionAttribute klasse.

WebDescriptionAttribute(String)

Initialiseert een nieuw exemplaar van de WebDescriptionAttribute klasse met de opgegeven beschrijving.

WebDescriptionAttribute()

Initialiseert een nieuw exemplaar van de WebDescriptionAttribute klasse.

public:
 WebDescriptionAttribute();
public WebDescriptionAttribute();
Public Sub New ()

Opmerkingen

De WebDescriptionAttribute constructor stelt de Description eigenschap in op een lege tekenreeks ("").

Van toepassing op

WebDescriptionAttribute(String)

Initialiseert een nieuw exemplaar van de WebDescriptionAttribute klasse met de opgegeven beschrijving.

public:
 WebDescriptionAttribute(System::String ^ description);
public WebDescriptionAttribute(string description);
new System.Web.UI.WebControls.WebParts.WebDescriptionAttribute : string -> System.Web.UI.WebControls.WebParts.WebDescriptionAttribute
Public Sub New (description As String)

Parameters

description
String

De knopinfo die moet worden gebruikt in een PropertyGridEditorPart.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u het WebDescriptionAttribute kenmerk gebruikt om een knopinfo toe te wijzen aan een eigenschap in een besturingselement webonderdelen. De aangepaste UserJobType eigenschap krijgt de knopinfo 'Selecteer de categorie die overeenkomt met uw taak.' om weer te geven in het PropertyGridEditorPart besturingselement. De knopinfo wordt toegewezen via de WebDescriptionAttribute constructor. Dit voorbeeld maakt deel uit van een groter voorbeeld in het PropertyGridEditorPart klasoverzicht.

[Personalizable(), WebBrowsable(), WebDisplayName("Job Type"), 
  WebDescription("Select the category that corresponds to your job.")]
public JobTypeName UserJobType
{
  get
  {
    object o = ViewState["UserJobType"];
    if (o != null)
      return (JobTypeName)o;
    else
      return _userJobType;
  }

  set { _userJobType = (JobTypeName)value; }
}
<Personalizable(), WebBrowsable(), WebDisplayName("Job Type"), _
  WebDescription("Select the category that corresponds to your job.")> _
Public Property UserJobType() As JobTypeName
  Get
    Dim o As Object = ViewState("UserJobType")
    If Not (o Is Nothing) Then
      Return CType(o, JobTypeName)
    Else
      Return _userJobType
    End If
  End Get
  Set(ByVal value As JobTypeName)
    _userJobType = CType(value, JobTypeName)
  End Set
End Property

Opmerkingen

De WebDescriptionAttribute constructor stelt de Description eigenschap in op description. De description parameter is de waarde die wordt weergegeven als knopinfo voor een eigenschap in een PropertyGridEditorPart besturingselement.

Van toepassing op