Validates the form digest control that is used in the current request.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
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.