Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Controllers.ControllerImpl.Redirect Method

Redirect to the specified target defined by the supplied action.

Class: YetaWF.Core.Controllers.ControllerImpl
Namespace: YetaWF.Core.Controllers
Assembly: YetaWF.Core

Syntax

protected ActionResult Redirect( ModuleAction action );
public new RedirectResult Redirect( string url );
protected ActionResult Redirect(
    string? url,
    bool ForcePopup = false,
    bool SetCurrentEditMode = false,
    bool ForceRedirect = false,
    string? ExtraJavascript = null );

Parameters

action

The ModuleAction defining the target where the page is redirected.

url

The URL defining the target where the page is redirected. If null is specified, the site's Home page is used instead.

ForcePopup

true if the redirect should occur in a popup window, false otherwise for a redirect within the browser window.

SetCurrentEditMode

true if the new page should be shown using the current Site Edit/Display Mode, false otherwise.

ForceRedirect

true to force a page load (even in a Unified Page Set), false otherwise to use the default page or page content loading.

ExtraJavascript

Optional Javascript code executed when redirecting to another URL within a Unified Page Set.

Return Value

An ActionResult to be returned by the controller.

Remarks

The Redirect method can be used for PUT, Ajax requests and also within popups. This works in cooperation with client-side code to redirect popups, etc., which is normally not supported in MVC.

p

The Redirect method can be used for GET, PUT, Ajax requests and also within popups. This works in cooperation with client-side code to redirect popups, etc., which is normally not supported in MVC.

See Also YetaWF.Core.Controllers.ControllerImpl ClassYetaWF.Core Overview