Class ViewDataDictionaryExtensions

Extensions on ViewDataDictionary

Inheritance
System.Object
ViewDataDictionaryExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public static class ViewDataDictionaryExtensions

Methods

GetEditHints<TViewModel, TContentData>(ViewDataDictionary)

Gets a collection of edit hints, which can be used to to add connections between view data properties and content data properties. Will store the hints in the view data dictionary.

Declaration
public static EditHintCollection<TViewModel, TContentData> GetEditHints<TViewModel, TContentData>(this ViewDataDictionary viewData)

    where TContentData : IContentData
Parameters
Type Name Description
System.Web.Mvc.ViewDataDictionary viewData

The view data.

Returns
Type Description
EditHintCollection<TViewModel, TContentData>

Collection, where edit hints can be added.

Type Parameters
Name Description
TViewModel

The type of the view model.

TContentData

The type of the content data.

Remarks

It's possible to access the hints directly by using ViewData[ViewDataKeys.PropertyConnections] or ViewData[ViewDataKeys.FullRefreshProperties].

Examples

The following example contains an controller which uses the EditHintCollection.