共用方式為


WebPart.ShouldValidate property

取得一個值,指出網頁組件基礎結構應該要執行的網頁組件屬性的資料驗證,再將它們設定。

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

Syntax

'宣告
Protected Friend ReadOnly Property ShouldValidate As Boolean
    Get
'用途
Dim value As Boolean

value = Me.ShouldValidate
protected internal bool ShouldValidate { get; }

Property value

Type: System.Boolean
true如果需要驗證 ; 在網頁組件屬性否則,請false。

備註

除非網頁組件屬性擷取自SharePoint Foundation資料庫的資料還原序列化ShouldValidate屬性值一律為true 。在此情況下,屬性不需要驗證,因為它們先前已驗證存放區,再並ShouldValidate屬性值會是false。只會在執行階段使用此屬性。

請參閱

參照

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace