Controller.PartialView 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
PartialView(String, Object) |
藉 PartialViewResult 由指定要 |
PartialView(String) |
藉由指定 |
PartialView() |
建立 PartialViewResult 物件,將部分檢視轉譯至回應。 |
PartialView(Object) |
指定要 PartialViewResult 由部分檢視轉譯的 ,以建立 物件 |
PartialView(String, Object)
藉 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)
藉由指定 viewName
來建立 PartialViewResult 物件。
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()
建立 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)
指定要 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 物件。
- 屬性