PageModel.RedirectToRoutePermanent 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RedirectToRoutePermanent(String, Object, String) |
使用 |
RedirectToRoutePermanent(Object) |
使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定 |
RedirectToRoutePermanent(String) |
使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定 |
RedirectToRoutePermanent(String, Object) |
使用指定的 和 |
RedirectToRoutePermanent(String, String) |
使用指定的 和 |
RedirectToRoutePermanent(String, Object, String)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
使用routeName
指定的 、 routeValues
和 fragment
将 (Status301MovedPermanently) 重定向到指定路由,并将 Permanent 设置为 true。
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoutePermanent(System::String ^ routeName, System::Object ^ routeValues, System::String ^ fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string routeName, object routeValues, string fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string? routeName, object? routeValues, string? fragment);
abstract member RedirectToRoutePermanent : string * obj * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoutePermanent : string * obj * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoutePermanent (routeName As String, routeValues As Object, fragment As String) As RedirectToRouteResult
参数
- routeName
- String
路由的名称。
- routeValues
- Object
路由的参数。
- fragment
- String
要添加到 URL 的片段。
返回
为响应创建的 RedirectToRouteResult 。
适用于
RedirectToRoutePermanent(Object)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeValues
路由Permanent。
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoutePermanent(System::Object ^ routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (object routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (object? routeValues);
abstract member RedirectToRoutePermanent : obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoutePermanent : obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoutePermanent (routeValues As Object) As RedirectToRouteResult
参数
- routeValues
- Object
路由的参数。
返回
为响应创建的 RedirectToRouteResult 。
适用于
RedirectToRoutePermanent(String)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName
路由Permanent。
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoutePermanent(System::String ^ routeName);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string routeName);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string? routeName);
abstract member RedirectToRoutePermanent : string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoutePermanent : string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoutePermanent (routeName As String) As RedirectToRouteResult
参数
- routeName
- String
路由的名称。
返回
为响应创建的 RedirectToRouteResult 。
适用于
RedirectToRoutePermanent(String, Object)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
使用指定的 和 routeValues
将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName
路由Permanent。
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoutePermanent(System::String ^ routeName, System::Object ^ routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string routeName, object routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string? routeName, object? routeValues);
abstract member RedirectToRoutePermanent : string * obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoutePermanent : string * obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoutePermanent (routeName As String, routeValues As Object) As RedirectToRouteResult
参数
- routeName
- String
路由的名称。
- routeValues
- Object
路由的参数。
返回
为响应创建的 RedirectToRouteResult 。
适用于
RedirectToRoutePermanent(String, String)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
使用指定的 和 fragment
将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName
路由Permanent。
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoutePermanent(System::String ^ routeName, System::String ^ fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string routeName, string fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent (string? routeName, string? fragment);
abstract member RedirectToRoutePermanent : string * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoutePermanent : string * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoutePermanent (routeName As String, fragment As String) As RedirectToRouteResult
参数
- routeName
- String
路由的名称。
- fragment
- String
要添加到 URL 的片段。
返回
为响应创建的 RedirectToRouteResult 。