Controller.RedirectToRoute Method

 

Redirects to a URL that is determined by the routing API.

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

NameDescription
System_CAPS_protmethodRedirectToRoute(Object)

Redirects to the specified route using the specified route values.

System_CAPS_protmethodRedirectToRoute(RouteValueDictionary)

Redirects to the specified route using the route dictionary.

System_CAPS_protmethodRedirectToRoute(String)

Redirects to the specified route using the route name.

System_CAPS_protmethodRedirectToRoute(String, Object)

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

System_CAPS_protmethodRedirectToRoute(String, RouteValueDictionary)

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

Return to top

Controller.RedirectToRoute Method (Object)

Redirects to the specified route using the specified route values.

protected internal RedirectToRouteResult RedirectToRoute(
	object routeValues
)

Parameters

routeValues
Type: System.Object

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect-to-route result object.

Return to top

Controller.RedirectToRoute Method (RouteValueDictionary)

Redirects to the specified route using the route dictionary.

protected internal RedirectToRouteResult RedirectToRoute(
	RouteValueDictionary routeValues
)

Parameters

routeValues
Type: System.Web.Routing.RouteValueDictionary

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect-to-route result object.

Return to top

Controller.RedirectToRoute Method (String)

Redirects to the specified route using the route name.

protected internal RedirectToRouteResult RedirectToRoute(
	string routeName
)

Parameters

routeName
Type: System.String

The name of the route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect-to-route result object.

Return to top

Controller.RedirectToRoute Method (String, Object)

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

protected internal RedirectToRouteResult RedirectToRoute(
	string routeName,
	object routeValues
)

Parameters

routeName
Type: System.String

The name of the route.

routeValues
Type: System.Object

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect-to-route result object.

Return to top

Controller.RedirectToRoute Method (String, RouteValueDictionary)

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

protected internal virtual RedirectToRouteResult RedirectToRoute(
	string routeName,
	RouteValueDictionary routeValues
)

Parameters

routeName
Type: System.String

The name of the route.

routeValues
Type: System.Web.Routing.RouteValueDictionary

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect-to-route result object.

Return to top
Show: