Export (0) Print
Expand All

WebPart.ShouldValidate property

Gets a value indicating whether the Web Part infrastructure should perform data validation of Web Part properties before setting them.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

protected internal bool ShouldValidate { get; }

Property value

Type: System.Boolean
true if the Web Part properties need to be validated; otherwise, false.

The value of the ShouldValidate property is always true unless the Web Part's properties are being deserialized with the data retrieved from the SharePoint Foundation database. In this case, the properties do not need to be validated because they were previously validated before storage, and the ShouldValidate property value will be false. This property is available only at runtime.

Community Additions

Show:
© 2014 Microsoft