ApiController.RedirectToRoute Method

 

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

Overload List

Name Description
System_CAPS_protmethod RedirectToRoute(String, IDictionary<String, Object>)

Creates a redirect to route result (302 Found) with the specified values.

System_CAPS_protmethod RedirectToRoute(String, Object)

Creates a redirect to route result (302 Found) with the specified values.

See Also

ApiController Class
System.Web.Http Namespace

Return to top

ApiController.RedirectToRoute Method (String, IDictionary<String, Object>)

Creates a redirect to route result (302 Found) with the specified values.

Syntax

protected internal virtual RedirectToRouteResult RedirectToRoute(
    string routeName,
    IDictionary<string, object> routeValues
)
public protected:
virtual RedirectToRouteResult^ RedirectToRoute(
    String^ routeName,
    IDictionary<String^, Object^>^ routeValues
)
abstract RedirectToRoute : 
        routeName:string *
        routeValues:IDictionary<string, Object> -> RedirectToRouteResult
override RedirectToRoute : 
        routeName:string *
        routeValues:IDictionary<string, Object> -> RedirectToRouteResult
Protected Friend Overridable Function RedirectToRoute (
    routeName As String,
    routeValues As IDictionary(Of String, Object)
) As RedirectToRouteResult

Parameters

  • routeName
    Type: System.String

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

Return Value

Type: System.Web.Http.Results.RedirectToRouteResult

A redirect to route result (302 Found) with the specified values.

Return to top

ApiController.RedirectToRoute Method (String, Object)

Creates a redirect to route result (302 Found) with the specified values.

Syntax

protected internal RedirectToRouteResult RedirectToRoute(
    string routeName,
    object routeValues
)
public protected:
RedirectToRouteResult^ RedirectToRoute(
    String^ routeName,
    Object^ routeValues
)
member RedirectToRoute : 
        routeName:string *
        routeValues:Object -> RedirectToRouteResult
Protected Friend Function RedirectToRoute (
    routeName As String,
    routeValues As Object
) As RedirectToRouteResult

Parameters

  • routeName
    Type: System.String

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

  • routeValues
    Type: System.Object

    The route data to use for generating the URL.

Return Value

Type: System.Web.Http.Results.RedirectToRouteResult

A redirect to route result (302 Found) with the specified values.

Return to top