TemplateInfo Class

 

Encapsulates information about the current template context.

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

Inheritance Hierarchy

System.Object
  System.Web.Mvc.TemplateInfo

Syntax

public class TemplateInfo
public ref class TemplateInfo 
type TemplateInfo = class end
Public Class TemplateInfo

Constructors

Name Description
System_CAPS_pubmethod TemplateInfo()

Initializes a new instance of the TemplateInfo class.

Properties

Name Description
System_CAPS_pubproperty FormattedModelValue

Gets or sets the formatted model value.

System_CAPS_pubproperty HtmlFieldPrefix

Gets or sets the HTML field prefix.

System_CAPS_pubproperty TemplateDepth

Contains the number of objects that were visited by the user.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetFullHtmlFieldId(String)

Retrieves the full DOM ID of a field using the specified HTML name attribute.

System_CAPS_pubmethod GetFullHtmlFieldName(String)

Retrieves the fully qualified name (including a prefix) for a field using the specified HTML name attribute.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Visited(ModelMetadata)

Determines whether the template has been visited by the user.

Remarks

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.

Thread Safety

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

See Also

System.Web.Mvc Namespace

Return to top