Share via


SPContext.SetCachedField Delegate

Implements a callback to set cached field values.

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

Syntax

Public Delegate Sub SetCachedField ( _
    fieldName As String, _
    cachedFieldValue As String _
)

Dim instance As New SetCachedField(AddressOf HandlerMethod)
public delegate void SetCachedField(
    string fieldName,
    string cachedFieldValue
)

Parameters

  • fieldName
    Type: System.String
    A string that specifies the name of the field to be cached.
  • cachedFieldValue
    Type: System.String
    A string that specifies the cached field output. This parameter can contain an empty string if there is nothing to display.

Remarks

To speed up rendering of field controls on non-Display form pages, you can implement a callback that caches the values. For security reasons, this callback can be used in Display mode only, and cannot be called for certain field controls (for example, for a Lookup field to a security-trimmed list). It is best practice to avoid setting callbacks for draft versions or for pages that are checked out.

See Also

Reference

Microsoft.SharePoint Namespace