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<IHtmlContent>

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

適用於