Partager via


ApiController.Redirect Method

 

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

Overload List

Name Description
System_CAPS_protmethod Redirect(String)

Creates a redirect result (302 Found) with the specified value.

System_CAPS_protmethod Redirect(Uri)

Creates a redirect result (302 Found) with the specified value.

See Also

ApiController Class
System.Web.Http Namespace

Return to top

ApiController.Redirect Method (String)

Creates a redirect result (302 Found) with the specified value.

Syntax

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

Parameters

Return Value

Type: System.Web.Http.Results.RedirectResult

A redirect result (302 Found) with the specified value.

Return to top

ApiController.Redirect Method (Uri)

Creates a redirect result (302 Found) with the specified value.

Syntax

protected internal virtual RedirectResult Redirect(
    Uri location
)
public protected:
virtual RedirectResult^ Redirect(
    Uri^ location
)
abstract Redirect : 
        location:Uri -> RedirectResult
override Redirect : 
        location:Uri -> RedirectResult
Protected Friend Overridable Function Redirect (
    location As Uri
) As RedirectResult

Parameters

  • location
    Type: System.Uri

    The location to redirect to.

Return Value

Type: System.Web.Http.Results.RedirectResult

A redirect result (302 Found) with the specified value.

Return to top