Example #1
1
 public static string GetCharisma_Alert(Charisma_AlertType type, string title, string msg)
 {
     var tag = new HtmlTag("div").AddClass("alert").AddClass(type.ToText());
     tag.Add("button").AddClass("close").Attr("type", "button").Attr("data-dismiss", "alert").Text("×");
     tag.Add("h4").AddClass("alert-heading").Text(title);
     tag.Add("p").Text(msg);
     return tag.ToString();
 }
Example #2
0
 public static string GetCharisma_Alert(Charisma_AlertType type, string title, IList<ValidationFailure> content)
 {
     var tag = new HtmlTag("div").AddClass("alert").AddClass(type.ToText());
     tag.Add("button").AddClass("close").Attr("type", "button").Attr("data-dismiss", "alert").Text("×");
     tag.Add("h4").AddClass("alert-heading").Text(title);
     foreach (var item in content)
     {
         tag.Add("p").Text(item.ErrorMessage);
     }
     return tag.ToString();
 }