/// <summary> /// Genera Mensaje de Alerta Html Boostrap Dimissable /// </summary> /// <param name="html"></param> /// <param name="tempData">TempData["AlertMessage"] required</param> /// <param name="hasIcon"></param> /// <returns></returns> public static IHtmlString Alert(this HtmlHelper html, TempDataDictionary tempData, bool hasIcon = false) { var sb = new StringBuilder(); foreach (var item in tempData.ToValue <List <IAlertMessage> >("AlertMessage")) { sb.AppendLine(Alert(html, item, hasIcon).ToHtmlString()); } return(MvcHtmlString.Create(sb.ToString())); }