02-29-04 09:34 PM
Hi Chandy,
to get the GUID do the following:
string[] splt = imageUrl.Split('/');
string GUID = splt[3];
Resource rs = CmsHttpContext.Current.Searches.GetByGuid("{"+GUID+"}") a
s
Resource;
if (rs != null)
{
// ok, we got the Resource object
}
else
{
// sorry! Local resource. No object available.
}
Cheers,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chandy" <chandy@totalise.co.uk> wrote in message
news:5af0375a.0402290851.2f354c82@posting.google.com...
> Hi all,
>
> We are using the built-in MCMS resource gallery browser to select or
> upload a resource then pull-back info on it and store it in a
> placeholder. The gallery browser returns the URL to the resource but
> we want to store the GUID. However, we don't seem able to resolve the
> URL back to a GUID!
>
> dim imageItem as Resource =
> CType(CmsHttpContext.Current.Searches.GetByPath(imageURL), Resource)
>
> This only ever returns Nothing. How can I get the resource object to
> get its GUID when all I have is a URL?
>
> Suggestions appreciated!
>
> Thanks,
>
> Chandy
[ Post a follow-up to this message ]
|