Table of Contents

Class AllowHtmlAttribute

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

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.)

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public sealed class AllowHtmlAttribute : Attribute, IMetadataAware
Inheritance
AllowHtmlAttribute
Implements
Inherited Members

Constructors

AllowHtmlAttribute()

Initializes a new instance of the AllowHtmlAttribute class.

public AllowHtmlAttribute()

Methods

OnMetadataCreated(ModelMetadata)

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

public void OnMetadataCreated(ModelMetadata metadata)

Parameters

metadata ModelMetadata

The model metadata.