TemplateInfo Class
Encapsulates information about the current template context.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The TemplateInfo type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | FormattedModelValue | Gets or sets the formatted model value. |
![]() | HtmlFieldPrefix | Gets or sets the HTML field prefix. |
![]() | TemplateDepth | Contains the number of objects that were visited by the user. |
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetFullHtmlFieldId | Retrieves the full DOM ID of a field using the specified HTML name attribute. |
![]() | GetFullHtmlFieldName | Retrieves the fully qualified name (including a prefix) for a field using the specified HTML name attribute. |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
![]() | Visited | Determines whether the template has been visited by the user. |
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.
Show:
