protected void AddMessage(SiteMessage message)
 {
     if (TempData.ContainsKey("Messages"))
     {
         var messages = (List<SiteMessage>)TempData["Messages"];
         messages.Add(message);
         TempData["Messages"] = messages;
     }
     else
     {
         var messages = new List<SiteMessage>();
         messages.Add(message);
         TempData["Messages"] = messages;
     }
 }
 private static string GenerateWarningMessage(SiteMessage message)
 {
     var output = new StringBuilder();
     output.Append("<div><span style=\"color: orange;font-size:larger;font-weight:bold;\">" + message.Message + " " + (string.IsNullOrEmpty(message.Link) ? string.Empty : string.Format("<a href=\"{0}\">{1}</a>", message.Link, message.LinkText)) + "</span></div>");            
     return output.ToString();
 }