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).