public virtual void RenderErrorsList(HtmlTextWriter writer) { if (HasNonAborts(_errorList)) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "errorlist"); writer.AddAttribute(HtmlTextWriterAttribute.Id, "errorlist"); writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "HideError(this)"); writer.RenderBeginTag(HtmlTextWriterTag.Div); bool first = true; foreach (Exception exception in _errorList) { if (!(exception is AbortException)) { if (first) { first = false; } else { writer.Write("<br>"); } ShowErrorsForm.RenderError(writer, exception); } } writer.RenderEndTag(); _errorList.Clear(); } }
public virtual void RenderRenderError(HtmlTextWriter writer, Exception exception) { writer.RenderBeginTag(HtmlTextWriterTag.Br); writer.RenderEndTag(); writer.Write(HttpUtility.HtmlEncode(Strings.Get("RenderErrorIntro"))); ShowErrorsForm.RenderError(writer, exception); writer.RenderBeginTag(HtmlTextWriterTag.Br); writer.RenderEndTag(); _errorList.Clear(); }