07-27-07 06:17 PM
Thanks, Stefan, but I need some further specifics.
I'm brand new to .Net and C# coding. I tried the process you
suggested but my search only returns a null. Any pointers??
Here is my code:
// sample GUID pasted to text box: FD5022B7-9DF6-4DEA-
A45F-674538E2C22B
private void Button1_Click(object sender, System.EventArgs e)
{
CmsHttpContext cmsContext =3D CmsHttpContext.Current;
String strResourceGUID =3D "{" + txtGUID.Text.ToString() + "}";
Resource rsResource =3D
cmsContext.Searches.GetByGuid(strResourceGUID) as Resource;
if (rsResource !=3D null)
{
txtOutput.Text =3D rsResource.Path.ToString();
}
else
{
txtOutput.Text =3D "No Resource Found!!";
}
}
On Jul 19, 2:44 am, "Stefan Go=DFner [MSFT]"
<stef...@online.microsoft.com> wrote:
> Hi Rob,
>
> theresourcecontains the GUID in the URL.
> You can useSearches.GetByGuidusing the GUID from the URL (you need to add
> the braces before and after) to get the item. Then check the Path property
> of the item to get the location.
>
> Cheers,
> Stefan
>
> "Rob" <saxon...@mercer.edu> wrote in message
>
> news:1184794211.770560.24390@g12g2000prg.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
[ Post a follow-up to this message ]
|