Ok am am very new to Umbraco/C# and what I am trying to do is loop through a custom media type to build banners for the home page of my application and the @bannerUrl always returns the images property id and not the file path to the resource. How would you go about retrieving the image file path from a custom media type created in Umbraco.
See code for example:
var mediaFolder = Umbraco.Media(mediaFolderId);
var banners = mediaFolder.Children();
foreach (var banner in banners)
var bannerUrl = banner.image;
Url = 'banner.Url' threw an exception of type 'System.NotSupportedException'
Solutioin if anyone happens to stumbles upon this:
var bannerId = Umbraco.Media(banner.image); //banner.image is the property id. var bannerUrl = bannerId.Url;