Class BindAttribute
Represents an attribute that is used to provide details about how model binding to a parameter should occur.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public sealed class BindAttribute : Attribute
- Inheritance
-
BindAttribute
- Inherited Members
Constructors
BindAttribute()
Initializes a new instance of the BindAttribute class.
public BindAttribute()
Properties
Exclude
Gets or sets a comma-delimited list of property names for which binding is not allowed.
public string Exclude { get; set; }
Property Value
- string
The exclude list.
Include
Gets or sets a comma-delimited list of property names for which binding is allowed.
public string Include { get; set; }
Property Value
- string
The include list.
Prefix
Gets or sets the prefix to use when markup is rendered for binding to an action argument or to a model property.
public string Prefix { get; set; }
Property Value
- string
The prefix to use.
Methods
IsPropertyAllowed(string)
Determines whether the specified property is allowed.
public bool IsPropertyAllowed(string propertyName)
Parameters
propertyName
stringThe name of the property.
Returns
- bool
true if the specified property is allowed; otherwise, false.