Edit

Share via


XmlDataSource.CacheKeyContext Property

Definition

Gets or sets the value of the cache key for the data source control from view state, or adds the cache key to view state.

public:
 virtual property System::String ^ CacheKeyContext { System::String ^ get(); void set(System::String ^ value); };
public virtual string CacheKeyContext { get; set; }
member this.CacheKeyContext : string with get, set
Public Overridable Property CacheKeyContext As String

Property Value

The value of the cache key, or an empty string if the cache key is not in view state.

Remarks

The CacheKeyContext property enables you to manually create a cache key for the XmlDataSource control. This is required only if you are assigning an object that contains XML or XSLT data to the control instead of specifying a file that contains the data. When you assign data to the control, the data is not used to generate the cache key. Instead, you must manually generate a unique cache key if you plan to update the data object.

Applies to