共用方式為


IHtmlHelper.PartialAsync(String, Object, ViewDataDictionary) 方法

定義

傳回指定部分檢視的 HTML 標籤。

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::IHtmlContent ^> ^ PartialAsync(System::String ^ partialViewName, System::Object ^ model, Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> PartialAsync (string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData);
abstract member PartialAsync : string * obj * Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent>
Public Function PartialAsync (partialViewName As String, model As Object, viewData As ViewDataDictionary) As Task(Of IHtmlContent)

參數

partialViewName
String

用來建立 HTML 標籤的部分檢視名稱。 必須不是 null

model
Object

要傳入部分檢視的模型。

viewData
ViewDataDictionary

ViewDataDictionary要傳入部分檢視的 。

傳回

Task完成時,會傳回包含所建立 HTML 的新 IHtmlContent 實例。

適用於