Share via


ViewExecutor.ExecuteAsync Method

Definition

Overloads

ExecuteAsync(ViewContext, String, Nullable<Int32>)

Source:
ViewExecutor.cs
Source:
ViewExecutor.cs
Source:
ViewExecutor.cs

Executes a view asynchronously.

protected System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string? contentType, int? statusCode);
protected System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string contentType, int? statusCode);

Parameters

viewContext
ViewContext

The ViewContext associated with the current request.

contentType
String

The content-type header value to set in the response. If null, DefaultContentType will be used.

statusCode
Nullable<Int32>

The HTTP status code to set in the response. May be null.

Returns

A Task which will complete when view execution is completed.

Applies to

ExecuteAsync(ActionContext, IView, ViewDataDictionary, ITempDataDictionary, String, Nullable<Int32>)

Source:
ViewExecutor.cs
Source:
ViewExecutor.cs
Source:
ViewExecutor.cs

Executes a view asynchronously.

public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string contentType, int? statusCode);
public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string? contentType, int? statusCode);

Parameters

actionContext
ActionContext

The ActionContext associated with the current request.

view
IView

The IView.

contentType
String

The content-type header value to set in the response. If null, DefaultContentType will be used.

statusCode
Nullable<Int32>

The HTTP status code to set in the response. May be null.

Returns

A Task which will complete when view execution is completed.

Applies to