SaaS CMS has officially launched! Learn more now.

Class RedirectToContentResult

An Microsoft.AspNetCore.Mvc.ActionResult that returns a Found (302). Targets a controller action.

Inheritance
System.Object
RedirectToContentResult
Implements
Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult
Microsoft.AspNetCore.Mvc.IActionResult
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
public class RedirectToContentResult : ActionResult, IKeepTempDataResult, IActionResult

Constructors

RedirectToContentResult(ContentReference, String, String)

Initializes a new instance of the RedirectToContentResult with the values provided.

Declaration
public RedirectToContentResult(ContentReference contentLink, string actionName, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link

System.String actionName

The name of the action to use for generating the URL.

System.String language

The language

Properties

ActionName

Gets or sets the name of the action to use for generating the URL.

Declaration
public string ActionName { get; set; }
Property Value
Type Description
System.String

Gets or sets the content link.

Declaration
public ContentReference ContentLink { get; set; }
Property Value
Type Description
ContentReference

Language

Gets or sets the language.

Declaration
public string Language { get; set; }
Property Value
Type Description
System.String

Methods

ExecuteResultAsync(ActionContext)

Declaration
public override Task ExecuteResultAsync(ActionContext context)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.ActionContext context
Returns
Type Description
System.Threading.Tasks.Task

Implements

Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult
Microsoft.AspNetCore.Mvc.IActionResult

Extension Methods