ViewComponentResult Class¶
An Microsoft.AspNetCore.Mvc.IActionResult
which renders a view component to the response.
- Namespace
Microsoft.AspNetCore.Mvc
- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class ViewComponentResult : ActionResult, IActionResult
-
class
Microsoft.AspNetCore.Mvc.
ViewComponentResult
Properties¶
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
Arguments
¶ Gets or sets the arguments provided to the view component.
Return type: System.Object public object Arguments { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
ContentType
¶ Gets or sets the Content-Type header for the response.
Return type: System.String public string ContentType { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
StatusCode
¶ Gets or sets the HTTP status code.
Return type: System.Nullable<System.Int32> public int ? StatusCode { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
TempData
¶ Gets or sets the
Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary
for this result.Return type: Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary public ITempDataDictionary TempData { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
ViewComponentName
¶ Gets or sets the name of the view component to invoke. Will be ignored if
Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentType
is set to a non-<code>null</code> value.Return type: System.String public string ViewComponentName { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
ViewComponentType
¶ Gets or sets the type of the view component to invoke.
Return type: System.Type public Type ViewComponentType { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
ViewData
¶ Gets or sets the
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
for this result.Return type: Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary public ViewDataDictionary ViewData { get; set; }
-
Microsoft.AspNetCore.Mvc.ViewComponentResult.
ViewEngine
¶ Gets or sets the
Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine
used to locate views.Return type: Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine public IViewEngine ViewEngine { get; set; }
-