Exemple #1
0
 public MvcHtmlString Message(HtmlMessage message)
 {
     if (message != null)
     {
         TagBuilder tag = new TagBuilder("div");
         tag.AddCssClass("message");
         tag.AddCssClass(message.CssClass);
         tag.InnerHtml = "<div class=\"message-icon\"></div><div class=\"message-content\">" + message.Content + "</div><div class=\"clear\"></div>";
         return(MvcHtmlString.Create(tag.ToString()));
     }
     else
     {
         return(MvcHtmlString.Create(""));
     }
 }
Exemple #2
0
 public void ShowMessage(string content, HtmlMessageType type = HtmlMessageType.Success)
 {
     TempData["Message"] = HtmlMessage.Create(content, type);
 }