Controller.PartialView 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
PartialView(String, Object) |
PartialViewResult通过指定要 |
PartialView(String) |
PartialViewResult通过指定 |
PartialView() |
创建一个 PartialViewResult 对象,该对象将分部视图呈现给响应。 |
PartialView(Object) |
PartialViewResult通过指定要 |
PartialView(String, Object)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
PartialViewResult通过指定要viewName
由分部视图呈现的 和 model
来创建 对象。
public:
virtual Microsoft::AspNetCore::Mvc::PartialViewResult ^ PartialView(System::String ^ viewName, System::Object ^ model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (string viewName, object model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (string? viewName, object? model);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PartialView : string * obj -> Microsoft.AspNetCore.Mvc.PartialViewResult
override this.PartialView : string * obj -> Microsoft.AspNetCore.Mvc.PartialViewResult
Public Overridable Function PartialView (viewName As String, model As Object) As PartialViewResult
参数
- viewName
- String
呈现到响应的分部视图的名称或路径。
- model
- Object
由分部视图呈现的模型。
返回
为响应创建的 PartialViewResult 对象。
- 属性
适用于
PartialView(String)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
PartialViewResult通过指定 viewName
创建 对象。
public:
virtual Microsoft::AspNetCore::Mvc::PartialViewResult ^ PartialView(System::String ^ viewName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (string viewName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (string? viewName);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PartialView : string -> Microsoft.AspNetCore.Mvc.PartialViewResult
override this.PartialView : string -> Microsoft.AspNetCore.Mvc.PartialViewResult
Public Overridable Function PartialView (viewName As String) As PartialViewResult
参数
- viewName
- String
呈现到响应的分部视图的名称或路径。
返回
为响应创建的 PartialViewResult 对象。
- 属性
适用于
PartialView()
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
创建一个 PartialViewResult 对象,该对象将分部视图呈现给响应。
public:
virtual Microsoft::AspNetCore::Mvc::PartialViewResult ^ PartialView();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PartialView : unit -> Microsoft.AspNetCore.Mvc.PartialViewResult
override this.PartialView : unit -> Microsoft.AspNetCore.Mvc.PartialViewResult
Public Overridable Function PartialView () As PartialViewResult
返回
为响应创建的 PartialViewResult 对象。
- 属性
适用于
PartialView(Object)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
PartialViewResult通过指定要model
由分部视图呈现的 来创建 对象。
public:
virtual Microsoft::AspNetCore::Mvc::PartialViewResult ^ PartialView(System::Object ^ model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (object model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView (object? model);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PartialView : obj -> Microsoft.AspNetCore.Mvc.PartialViewResult
override this.PartialView : obj -> Microsoft.AspNetCore.Mvc.PartialViewResult
Public Overridable Function PartialView (model As Object) As PartialViewResult
参数
- model
- Object
由分部视图呈现的模型。
返回
为响应创建的 PartialViewResult 对象。
- 属性