Edit

Bagikan melalui


HttpResponseBase.RedirectToRoute Method

Definition

Redirects the request to a new URL by using route parameter values, a route name, or both.

Overloads

RedirectToRoute(Object)

Redirects the request to a new URL by using route parameter values.

RedirectToRoute(String)

Redirects the request to a new URL by using a route name.

RedirectToRoute(RouteValueDictionary)

Redirects the request to a new URL by using route parameter values.

RedirectToRoute(String, Object)

Redirects the request to a new URL by using route parameter values and a route name.

RedirectToRoute(String, RouteValueDictionary)

Redirects the request to a new URL by using route parameter values and a route name.

RedirectToRoute(Object)

Redirects the request to a new URL by using route parameter values.

public:
 virtual void RedirectToRoute(System::Object ^ routeValues);
public virtual void RedirectToRoute (object routeValues);
abstract member RedirectToRoute : obj -> unit
override this.RedirectToRoute : obj -> unit
Public Overridable Sub RedirectToRoute (routeValues As Object)

Parameters

routeValues
Object

The route parameter values.

Exceptions

Remarks

For information about this member, see HttpResponse.RedirectToRoute(Object).

Applies to

RedirectToRoute(String)

Redirects the request to a new URL by using a route name.

public:
 virtual void RedirectToRoute(System::String ^ routeName);
public virtual void RedirectToRoute (string routeName);
abstract member RedirectToRoute : string -> unit
override this.RedirectToRoute : string -> unit
Public Overridable Sub RedirectToRoute (routeName As String)

Parameters

routeName
String

The name of the route.

Exceptions

Remarks

For information about this member, see HttpResponse.RedirectToRoute(String).

Applies to

RedirectToRoute(RouteValueDictionary)

Redirects the request to a new URL by using route parameter values.

public:
 virtual void RedirectToRoute(System::Web::Routing::RouteValueDictionary ^ routeValues);
public virtual void RedirectToRoute (System.Web.Routing.RouteValueDictionary routeValues);
abstract member RedirectToRoute : System.Web.Routing.RouteValueDictionary -> unit
override this.RedirectToRoute : System.Web.Routing.RouteValueDictionary -> unit
Public Overridable Sub RedirectToRoute (routeValues As RouteValueDictionary)

Parameters

routeValues
RouteValueDictionary

The route parameter values.

Exceptions

Remarks

For information about this member, see HttpResponse.RedirectToRoute(RouteValueDictionary).

Applies to

RedirectToRoute(String, Object)

Redirects the request to a new URL by using route parameter values and a route name.

public:
 virtual void RedirectToRoute(System::String ^ routeName, System::Object ^ routeValues);
public virtual void RedirectToRoute (string routeName, object routeValues);
abstract member RedirectToRoute : string * obj -> unit
override this.RedirectToRoute : string * obj -> unit
Public Overridable Sub RedirectToRoute (routeName As String, routeValues As Object)

Parameters

routeName
String

The name of the route.

routeValues
Object

The route parameter values.

Exceptions

Remarks

For information about this member, see HttpResponse.RedirectToRoute(String, Object).

Applies to

RedirectToRoute(String, RouteValueDictionary)

Redirects the request to a new URL by using route parameter values and a route name.

public:
 virtual void RedirectToRoute(System::String ^ routeName, System::Web::Routing::RouteValueDictionary ^ routeValues);
public virtual void RedirectToRoute (string routeName, System.Web.Routing.RouteValueDictionary routeValues);
abstract member RedirectToRoute : string * System.Web.Routing.RouteValueDictionary -> unit
override this.RedirectToRoute : string * System.Web.Routing.RouteValueDictionary -> unit
Public Overridable Sub RedirectToRoute (routeName As String, routeValues As RouteValueDictionary)

Parameters

routeName
String

The name of the route.

routeValues
RouteValueDictionary

The route parameter values.

Exceptions

Remarks

For information about this member, see HttpResponse.RedirectToRoute(String, RouteValueDictionary).

Applies to