Поделиться через


SPContext.GetCachedField Delegate

Implements a callback to check for a cached field value.

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

Syntax

Public Delegate Function GetCachedField ( _
    fieldName As String, _
    <OutAttribute> ByRef cachedFieldValue As String _
) As Boolean

Dim instance As New GetCachedField(AddressOf HandlerMethod)
public delegate bool GetCachedField(
    string fieldName,
    out string cachedFieldValue
)

Parameters

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

Return Value

Type: System.Boolean
true if the cache contains an item, even if the item is an empty string; otherwise, false.

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 on pages that have been checked out or on draft versions.

See Also

Reference

Microsoft.SharePoint Namespace