Dnn.Modules.Vendors.Components.BannerController.FormatImage C# (CSharp) Method

FormatImage() private method

private FormatImage ( string File, int Width, int Height, string BannerName, string Description ) : string
File string
Width int
Height int
BannerName string
Description string
return string
        private string FormatImage(string File, int Width, int Height, string BannerName, string Description)
        {
            var Image = new StringBuilder();
            Image.Append("<img src=\"" + File + "\" border=\"0\"");
            if (!String.IsNullOrEmpty(Description))
            {
                Image.Append(" alt=\"" + Description + "\"");
            }
            else
            {
                Image.Append(" alt=\"" + BannerName + "\"");
            }
            if (Width > 0)
            {
                Image.Append(" width=\"" + Width + "\"");
            }
            if (Height > 0)
            {
                Image.Append(" height=\"" + Height + "\"");
            }
            Image.Append("/>");
            return Image.ToString();
        }