Share via


SignedDataBlock.Sign method

Invokes the Sign dialog box for adding a digital signature to the set of data represented by the specified SignedDataBlock object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride Sub Sign
'Usage
Dim instance As SignedDataBlock

instance.Sign()
public abstract void Sign()

Exceptions

Exception Condition
InvalidOperationException

Form code attempted to write to the underlying XML document after signing was initiated.

SecurityException

The form template is not configured for Full Trust using the Security and Trust category of the Form Options dialog box.

Remarks

The new signature uses the default signature template, which is applied to the set of data represented by the specified SignedDataBlock object. Calling this method advances to the second step in the signing process which is performed using the Sign dialog box: verifying that the form or section being signed is correct and specifying additional information that will be stored with the digital signature, such as selecting a picture to use as a signature, and specifying the purpose for signing. The user can also choose to sign using a different digital certificate.

This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Examples

The following example will invoke the Sign dialog box for the set of data represented by the specified SignedDataBlock object.

this.SignedDataBlocks[0].Sign();
Me.SignedDataBlocks(0).Sign()

See also

Reference

SignedDataBlock class

SignedDataBlock members

Microsoft.Office.InfoPath namespace