1

I have a list of publishing page's Guids which are from different sites, I want to get the page properties like URL, Title and content type from that GUID. Is there any way we can do it in code behind?

Preferably not loop through each site considering performance factor.

2
 static string GetUrlByGuid(Guid guid)
    {
        var item = SPFarm.Local.GetObject(guid);
        if (item == null) 
            return null;
        return item.ToString(); //return item.Url or something like it
    }

Refer:

https://stackoverflow.com/questions/4709212/get-site-url-based-on-guid-sharepoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.