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

定义

返回指定分部视图的 HTML 标记。

public:
 virtual 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>
override this.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 实例。

实现

适用于