string videoThumbnailID = galleryVideo.GetProperty("videoMediumThumbnail").Value; int thumbID = int.Parse(videoThumbnailID); Media m = new Media(thumbID); string imageUrl = m.getProperty("umbracoFile").Value.ToString();
But imageUrl is returning the ID of the Media Node, not the URL.
Get Media URL -- problem .NET (not XSLT)
Hi,
Currently using Umbraco 4.0.2.1
I am trying to get the Image URL of a Media node, but all I can ever return is the Media Node ID.
I pass in the Media Node ID but I can never get the URL of that Node.
I am using .NET for this user control so please help me with .NET solutions rather than XSLT.
Thanks,
Owen
Currently I am using this method:
But imageUrl is returning the ID of the Media Node, not the URL.
Thanks,
Owen
Hi Owen
Try having a look at this post: http://our.umbraco.org/forum/developers/api-questions/5616-accessing-umbracolibraryGetMedia-in-a-user-control
Does that do the trick fr you?
/Jan
is working on a reply...