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