3 回答
TA贡献1998条经验 获得超6个赞
Html.Partial
Html.RenderPartial
Write
void
.
// Razor syntax@Html.Partial("ViewName")@{ Html.RenderPartial("ViewName"); } // WebView syntax<%: Html.Partial("ViewName") %><% Html.RenderPartial("ViewName"); %>
Html.Partial
Html.RenderPartial
Response
Html.Action
Html.RenderAction
.
TA贡献1828条经验 获得超13个赞
@html.Partial‘
@Html.RenderPartial‘
public static MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, object model, ViewDataDictionary viewData){ MvcHtmlString mvcHtmlString; using (StringWriter stringWriter = new StringWriter(CultureInfo.CurrentCulture)) { htmlHelper.RenderPartialInternal(partialViewName, viewData, model, stringWriter, ViewEngines.Engines); mvcHtmlString = MvcHtmlString.Create(stringWriter.ToString()); } return mvcHtmlString;}public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName){ htmlHelper.RenderPartialInternal(partialViewName, htmlHelper.ViewData, null, htmlHelper.ViewContext.Writer, ViewEngines.Engines);}
TA贡献1744条经验 获得超4个赞
RenderAction
- 3 回答
- 0 关注
- 535 浏览
相关问题推荐
添加回答
举报