public static MvcHtmlString GetMessage(this HtmlHelper html) { TempDataDictionary tempData = html.ViewContext.TempData; if (tempData.IsMessageExists()) { string messageTypeClass = tempData.GetMessageTypeClass(""); string imageHtml = html.SpriteImage("", "msgImg " + messageTypeClass + "Img").ToString(); return (MvcHtmlString.Create(string.Format(MessageHtmlTemplate, tempData.GetMessage(), messageTypeClass, imageHtml))); } return(MvcHtmlString.Empty); }