Wednesday, July 9, 2014

Calling partial view in MVC as HTML helper class

public static void InfoButton(this HtmlHelper helper, string id, string description)
{
var response = helper.ViewContext.HttpContext.Response;
System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(helper, "_partial", 
new ViewDataDictionary { { "id", id }, { "descr", description } });
}

No comments:

Post a Comment