RSS

导航

信息

联系方式(Contact)






 
HtmlHelperViewPage的扩展

增加了RenderAction及RenderRoute的扩展

定义 C#:
public static class ViewExtensions
{
    // Methods
    public static void RenderAction<TController>(this HtmlHelper helper, Expression<Action<TController>> action) where TController: Controller;
    public static void RenderAction(this HtmlHelper helper, string actionName);
    public static void RenderAction(this HtmlHelper helper, string actionName, string controllerName);
    public static void RenderAction(this HtmlHelper helper, string actionName, string controllerName, object values);
    public static void RenderAction(this HtmlHelper helper, string actionName, string controllerName, RouteValueDictionary values);
    public static void RenderRoute(this HtmlHelper helper, RouteValueDictionary values);
}

使用方法: C#:
<%=Html.RenderUserControl("~/views/user/index-account.ascx", ViewData.Model)%>
Eice.com.cn 2008 黑ICP备09002611号 | 关于我们 | 技术支持 |