We have a asp.net mvc website in which we would like to display data from Umbraco. The Umbraco installation is on a different web app.
With SQL we query the Umbraco database. For media items the result is something like "umb://media/3d32d4c5a98549d89d7b7feb452fb0c3".
Now we need to convert this to a proper url (which is also in the Umbraco database). But somehow we need to fugure out how to convert the UDI.
How do I do this?? I've tried for half a day now but without any result.
Which Umbraco dll's should I reference in my asp.net mvc project?
In the previous versions of Umbraco we could just reference the media by ID. But not anymore...
If you use Umbraco.TypedContent() and pass the UDI into it, you can then do .Url. Umbraco parses the UDI to save you the headache of doing so yourself.
Getting media url from uid
Hi,
I'm totally stuck. :-(
We have a asp.net mvc website in which we would like to display data from Umbraco. The Umbraco installation is on a different web app. With SQL we query the Umbraco database. For media items the result is something like "umb://media/3d32d4c5a98549d89d7b7feb452fb0c3". Now we need to convert this to a proper url (which is also in the Umbraco database). But somehow we need to fugure out how to convert the UDI. How do I do this?? I've tried for half a day now but without any result. Which Umbraco dll's should I reference in my asp.net mvc project? In the previous versions of Umbraco we could just reference the media by ID. But not anymore...
Greetings,
André
If you use Umbraco.TypedContent() and pass the UDI into it, you can then do .Url. Umbraco parses the UDI to save you the headache of doing so yourself.
is working on a reply...