SPContext.SetCachedField delegate
Collapse the table of content
Expand the table of content

SPContext.SetCachedField delegate

Implements a callback to set cached field values.

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

public delegate void SetCachedField(
	string fieldName,
	string cachedFieldValue


Type: System.String

A string that specifies the name of the field to be cached.

Type: System.String

A string that specifies the cached field output. This parameter can contain an empty string if there is nothing to display.

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.

© 2015 Microsoft