HttpResponseBase.RedirectToRoute 方法

定義

使用路由參數值和/或路由名稱,將要求重新導向至新的 URL。Redirects the request to a new URL by using route parameter values, a route name, or both.

多載

RedirectToRoute(Object)

使用路由參數值,將要求重新導向至新的 URL。Redirects the request to a new URL by using route parameter values.

RedirectToRoute(String)

使用路由名稱,將要求重新導向至新的 URL。Redirects the request to a new URL by using a route name.

RedirectToRoute(RouteValueDictionary)

使用路由參數值,將要求重新導向至新的 URL。Redirects the request to a new URL by using route parameter values.

RedirectToRoute(String, Object)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。Redirects the request to a new URL by using route parameter values and a route name.

RedirectToRoute(String, RouteValueDictionary)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。Redirects the request to a new URL by using route parameter values and a route name.

RedirectToRoute(Object)

使用路由參數值,將要求重新導向至新的 URL。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)

參數

routeValues
Object

路由參數值。The route parameter values.

例外狀況

永遠。Always.

備註

如需這個成員的詳細資訊,請參閱 HttpResponse.RedirectToRoute(Object)For information about this member, see HttpResponse.RedirectToRoute(Object).

適用於

RedirectToRoute(String)

使用路由名稱,將要求重新導向至新的 URL。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)

參數

routeName
String

路由的名稱。The name of the route.

例外狀況

永遠。Always.

備註

如需這個成員的詳細資訊,請參閱 HttpResponse.RedirectToRoute(String)For information about this member, see HttpResponse.RedirectToRoute(String).

適用於

RedirectToRoute(RouteValueDictionary)

使用路由參數值,將要求重新導向至新的 URL。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)

參數

routeValues
RouteValueDictionary

路由參數值。The route parameter values.

例外狀況

永遠。Always.

備註

如需這個成員的詳細資訊,請參閱 HttpResponse.RedirectToRoute(RouteValueDictionary)For information about this member, see HttpResponse.RedirectToRoute(RouteValueDictionary).

適用於

RedirectToRoute(String, Object)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。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)

參數

routeName
String

路由的名稱。The name of the route.

routeValues
Object

路由參數值。The route parameter values.

例外狀況

永遠。Always.

備註

如需這個成員的詳細資訊,請參閱 HttpResponse.RedirectToRoute(String, Object)For information about this member, see HttpResponse.RedirectToRoute(String, Object).

適用於

RedirectToRoute(String, RouteValueDictionary)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。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)

參數

routeName
String

路由的名稱。The name of the route.

routeValues
RouteValueDictionary

路由參數值。The route parameter values.

例外狀況

永遠。Always.

備註

如需這個成員的詳細資訊,請參閱 HttpResponse.RedirectToRoute(String, RouteValueDictionary)For information about this member, see HttpResponse.RedirectToRoute(String, RouteValueDictionary).

適用於