accessing umbraco.library.GetMedia in a user control
Hi
Does anyone have any pointers for accessing GetMedia information in a .Net control? I'm trying to read the value of a media Item in, but I can't seem to work out the correct method.
At the moment all of these are returning the same string -/media/372/test.docdoc9216
One thing to note, if you don't already have access to the Media object, you may need to add references to the umbraco dlls cms.dll and businesslogic.dll in your project. Then add the following line at the top of your user control:
accessing umbraco.library.GetMedia in a user control
Hi
Does anyone have any pointers for accessing GetMedia information in a .Net control? I'm trying to read the value of a media Item in, but I can't seem to work out the correct method.
At the moment all of these are returning the same string -/media/372/test.docdoc9216
You can just use the Media-object.
Brilliant, thats done the trick. Thanks Jeroen.
Thanks Jeroen - saved me some time there!
One thing to note, if you don't already have access to the Media object, you may need to add references to the umbraco dlls cms.dll and businesslogic.dll in your project. Then add the following line at the top of your user control:
Cheers,
David
is working on a reply...