Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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
)

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.

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.

Show:
© 2015 Microsoft