WebPart.ShouldValidate 属性
获取一个值,指示 Web 部件基础结构是否应执行之前将它们设置 Web 部件属性的数据有效性。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Protected Friend ReadOnly Property ShouldValidate As Boolean
Get
用法
Dim value As Boolean
value = Me.ShouldValidate
protected internal bool ShouldValidate { get; }
属性值
类型:System.Boolean
true如果需要进行验证,则 Web 部件属性否则为false。
备注
ShouldValidate属性的值始终是true ,除非 Web 部件的属性反序列化从SharePoint Foundation数据库中检索的数据。在这种情况下,不需要属性因为以前验证之前的存储,并且ShouldValidate属性值将为false进行验证。此属性是只在运行时可用。