ViewComponent Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A base class for view components.
public ref class ViewComponent abstract
[Microsoft.AspNetCore.Mvc.ViewComponent]
public abstract class ViewComponent
[<Microsoft.AspNetCore.Mvc.ViewComponent>]
type ViewComponent = class
Public MustInherit Class ViewComponent
- Inheritance
-
ViewComponent
- Attributes
Constructors
ViewComponent() |
Properties
HttpContext |
Gets the HttpContext. |
ModelState |
Gets the ModelStateDictionary. |
Request |
Gets the HttpRequest. |
RouteData |
Gets the RouteData for the current request. |
TempData |
Gets the ITempDataDictionary. |
Url |
Gets or sets the IUrlHelper. |
User |
Gets the IPrincipal for the current user. |
UserClaimsPrincipal |
Gets the ClaimsPrincipal for the current user. |
ViewBag |
Gets the view bag. |
ViewComponentContext |
Gets or sets the ViewComponentContext. |
ViewContext |
Gets the ViewContext. |
ViewData |
Gets the ViewDataDictionary. |
ViewEngine |
Gets or sets the ICompositeViewEngine. |
Methods
Content(String) |
Returns a result which will render HTML encoded text. |
View() |
Returns a result which will render the partial view with name |
View(String) |
Returns a result which will render the partial view with name |
View<TModel>(String, TModel) |
Returns a result which will render the partial view with name |
View<TModel>(TModel) |
Returns a result which will render the partial view with name |