public void Render(HtmlObject control) { try { var renderStart = DateTime.Now; control.Render(Context); RenderCost = DateTime.Now - renderStart; } catch (Exception e) { //gravar na saida mais dados sobre o erro. Exception ex = new Exception(String.Format("Erro ao renderizar o controle: \n Pilha: {0}", GetStackString()), e); throw ex; } }
public static void Render <TModel>(this HtmlHelper <TModel> htmlHelper, HtmlObject control) where TModel : class { control.Render(htmlHelper.ViewContext.Controller, htmlHelper.ViewData, false); }
public static void Render(this HtmlHelper htmlHelper, HtmlObject control) { control.Render(htmlHelper.ViewContext.Controller, htmlHelper.ViewData, false); }