AllowHtmlAttribute AllowHtmlAttribute 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
AllowHtmlAttributeAllowHtmlAttributeAllowHtmlAttribute
Attributes
Implements

Constructors

AllowHtmlAttribute() AllowHtmlAttribute() AllowHtmlAttribute()

Initializes a new instance of the AllowHtmlAttribute class.

Methods

OnMetadataCreated(ModelMetadata) OnMetadataCreated(ModelMetadata) OnMetadataCreated(ModelMetadata)

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

Applies to