/// <summary> /// Creates an HTML img tag to display the specified file from the application's image folder /// </summary> /// <param name = "viewPage"></param> /// <param name = "fileOrUrl">The name of the image file, relative to the applications' image folder</param> /// <returns></returns> public static ImageTag Image(this IFubuPage viewPage, string fileOrUrl) { var imageUrl = Uri.IsWellFormedUriString(fileOrUrl, UriKind.Absolute) ? fileOrUrl : viewPage.ImageUrl(fileOrUrl); return(new ImageTag(imageUrl)); }
/// <summary> /// Renders an HTML img tag to display the specified file from the application's image folder /// </summary> /// <param name = "viewPage"></param> /// <param name = "imageFilename">The name of the image file, relative to the applications' image folder</param> /// <returns></returns> public static ImageTag Image(this IFubuPage viewPage, string imageFilename) { string imageUrl = viewPage.ImageUrl(imageFilename); return(new ImageTag(imageUrl)); }