public override string ToString() { if (String.IsNullOrEmpty(Message)) { return(String.Empty); } else if (CssClass != CssMessageClassEnum.none) { if (Dismiss == MessageDismissEnum.none) { return(string.Format("<div class=\"{0}\">{1}</div>", CssClass.GetEnumDescription <CssMessageClassEnum>(), Message)); } else if (Dismiss == MessageDismissEnum.close) { return(string.Format("<div class=\"{0}\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>{1}</div>", CssClass.GetEnumDescription <CssMessageClassEnum>(), Message)); } else { return(string.Format("<div class=\"{0} alert-timeout\" data-timeout=\"{2}\">{1}</div>", CssClass.GetEnumDescription <CssMessageClassEnum>(), Message, Timeout.ToString())); } } return(base.ToString()); }