Controller.Redirect Method (String)

 

Creates a RedirectResult object that redirects to the specified URL.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

protected internal virtual RedirectResult Redirect(
    string url
)
public protected:
virtual RedirectResult^ Redirect(
    String^ url
)
abstract Redirect : 
        url:string -> RedirectResult
override Redirect : 
        url:string -> RedirectResult
Protected Friend Overridable Function Redirect (
    url As String
) As RedirectResult

Parameters

Return Value

Type: System.Web.Mvc.RedirectResult

The redirect result object.

Remarks

The result object that is prepared by this method is written to the response by the ASP.NET MVC framework when the object is executed.

See Also

Controller Class
System.Web.Mvc Namespace

Return to top