[Umbraco] How to get media URL

Here is one way to do:

string s = string.Empty;
System.Xml.XPath.XPathNavigator n = umbraco.library.GetMedia(m.Id, false).Current;
System.Xml.XPath.XPathNavigator d = n.SelectSingleNode("/node/data[@alias='umbracoFile']");
s=d.InnerXml; // Here is the path

1 comment:

Guild wars 2 Gold said...

Wonderful perform. And incredible assortment of tools to work... Great!! guild wars 2 key

Diablo III gold