AllowHtmlAttribute 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
藉由略過屬性的要求驗證,允許要求在模型繫結期間包含 HTML 標記 (強烈建議您讓應用程式明確檢查所有停用要求驗證的模型,以避免指令碼擅用)。
[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
- 繼承
-
AllowHtmlAttribute
- 屬性
- 實作
Allow |
初始化 AllowHtmlAttribute 類別的新執行個體。 |
On |
這個方法支援 ASP.NET MVC 驗證基礎結構,但不建議直接在程式碼中使用。 |