Extension methods for ViewContext.
Definition
Namespace:Kendo.Mvc.Extensions
Assembly:Kendo.Mvc.dll
Syntax:
public static class ViewContextExtensions
Inheritance: objectViewContextExtensions
Inherited Members
Methods
Creates an HtmlHelper instance for the specified model type.
public static HtmlHelper<T> CreateHtmlHelper<T>(this ViewContext viewContext)
The view context.
Returns:HtmlHelper<T>
An HtmlHelper instance for the specified type.
Gets the full HTML field name for the given field name within the current template context.
public static string GetFullHtmlFieldName(this ViewContext viewContext, string name)
The view context.
namestringThe field name.
Returns:The full HTML field name.
Gets a service of the specified type from the HTTP context.
public static T GetService<T>(this HttpContext context)
The HTTP context.
Returns:T
The service instance.
Gets a service of the specified type from the ViewContext's HTTP context.
public static T GetService<T>(this ViewContext viewContext)
The view context.
Returns:T
The service instance.
Creates a ViewContext for a specific model type.
public static ViewContext ViewContextForType<T>(this ViewContext viewContext, IModelMetadataProvider metadataProvider)
The source view context.
metadataProviderIModelMetadataProviderThe model metadata provider.
Returns:A new ViewContext configured for the specified type.