Controller::RedirectToAction Method

 

Returns an HTTP 302 response to the browser, which causes the browser to make a GET request to the specified action.

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

NameDescription
System_CAPS_protmethodRedirectToAction(String^)

Redirects to the specified action using the action name.

System_CAPS_protmethodRedirectToAction(String^, Object^)

Redirects to the specified action using the action name and route values.

System_CAPS_protmethodRedirectToAction(String^, RouteValueDictionary^)

Redirects to the specified action using the action name and route dictionary.

System_CAPS_protmethodRedirectToAction(String^, String^)

Redirects to the specified action using the action name and controller name.

System_CAPS_protmethodRedirectToAction(String^, String^, Object^)

Redirects to the specified action using the action name, controller name, and route dictionary.

System_CAPS_protmethodRedirectToAction(String^, String^, RouteValueDictionary^)

Redirects to the specified action using the action name, controller name, and route values.

Return to top

Controller::RedirectToAction Method (String^)

Redirects to the specified action using the action name.

public protected:
RedirectToRouteResult^ RedirectToAction(
	String^ actionName
)

Parameters

actionName
Type: System::String^

The name of the action.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top

Controller::RedirectToAction Method (String^, Object^)

Redirects to the specified action using the action name and route values.

public protected:
RedirectToRouteResult^ RedirectToAction(
	String^ actionName,
	Object^ routeValues
)

Parameters

actionName
Type: System::String^

The name of the action.

routeValues
Type: System::Object^

The parameters for a route.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top

Controller::RedirectToAction Method (String^, RouteValueDictionary^)

Redirects to the specified action using the action name and route dictionary.

public protected:
RedirectToRouteResult^ RedirectToAction(
	String^ actionName,
	RouteValueDictionary^ routeValues
)

Parameters

actionName
Type: System::String^

The name of the action.

routeValues
Type: System.Web.Routing::RouteValueDictionary^

The parameters for a route.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top

Controller::RedirectToAction Method (String^, String^)

Redirects to the specified action using the action name and controller name.

public protected:
RedirectToRouteResult^ RedirectToAction(
	String^ actionName,
	String^ controllerName
)

Parameters

actionName
Type: System::String^

The name of the action.

controllerName
Type: System::String^

The name of the controller.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top

Controller::RedirectToAction Method (String^, String^, Object^)

Redirects to the specified action using the action name, controller name, and route dictionary.

public protected:
RedirectToRouteResult^ RedirectToAction(
	String^ actionName,
	String^ controllerName,
	Object^ routeValues
)

Parameters

actionName
Type: System::String^

The name of the action.

controllerName
Type: System::String^

The name of the controller.

routeValues
Type: System::Object^

The parameters for a route.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top

Controller::RedirectToAction Method (String^, String^, RouteValueDictionary^)

Redirects to the specified action using the action name, controller name, and route values.

public protected:
virtual RedirectToRouteResult^ RedirectToAction(
	String^ actionName,
	String^ controllerName,
	RouteValueDictionary^ routeValues
)

Parameters

actionName
Type: System::String^

The name of the action.

controllerName
Type: System::String^

The name of the controller.

routeValues
Type: System.Web.Routing::RouteValueDictionary^

The parameters for a route.

Return Value

Type: System.Web.Mvc::RedirectToRouteResult^

The redirect result object.

Return to top
Show: