Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TemplateInfo Class

Encapsulates information about the current template context.

System.Object
  System.Web.Mvc.TemplateInfo

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public class TemplateInfo

The TemplateInfo type exposes the following members.

  NameDescription
Public methodTemplateInfoInitializes a new instance of the TemplateInfo class.
Top

  NameDescription
Public propertyFormattedModelValueGets or sets the formatted model value.
Public propertyHtmlFieldPrefixGets or sets the HTML field prefix.
Public propertyTemplateDepthContains the number of objects that were visited by the user.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetFullHtmlFieldIdRetrieves the full DOM ID of a field using the specified HTML name attribute.
Public methodGetFullHtmlFieldNameRetrieves the fully qualified name (including a prefix) for a field using the specified HTML name attribute.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodVisitedDetermines whether the template has been visited by the user.
Top

The TemplateInfo class is used to retrieve metadata for templates or HTML helpers that you create. You can access the TemplateInfo instance from the ViewDataDictionary. The TemplateInfo instance can not be accessed outside a template.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft