SPWeb.ValidateFormDigest Method

Validates the form digest control that is used in the current request.

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

Syntax

Public Function ValidateFormDigest As Boolean

Dim instance As SPWeb
Dim returnValue As Boolean

returnValue = instance.ValidateFormDigest()
public bool ValidateFormDigest()

Return Value

Type: System.Boolean
true if the form digest control is valid, otherwise, false.

Remarks

The ValidateFormDigest method can be used to explicitly check the security validation that is used in an .aspx page. This method searches the .aspx page for the INPUT control that is named __REQUESTDIGEST and verifies that the message digest contained in the control is valid. This method can be used in code that runs on a second .aspx page to which the first .aspx page posts, or on the first page if a second page is not involved. This method assumes that a FormDigest control exists on the .aspx page that is making the post.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace