AllowHtmlAttribute Class

Definition

Allows a request to include HTML markup during model binding by skipping request validation for the property. (It is strongly recommended that your application explicitly check all models where you disable request validation in order to prevent script exploits.)

[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class AllowHtmlAttribute : Attribute, System.Web.Mvc.IMetadataAware
type AllowHtmlAttribute = class
    inherit Attribute
    interface IMetadataAware
Public NotInheritable Class AllowHtmlAttribute
Inherits Attribute
Implements IMetadataAware
Inheritance
AllowHtmlAttribute
Attributes
Implements

Constructors

AllowHtmlAttribute()

Initializes a new instance of the AllowHtmlAttribute class.

Methods

OnMetadataCreated(ModelMetadata)

This method supports the ASP.NET MVC validation infrastructure and is not intended to be used directly from your code.

Applies to