is there any code example that shows me how to get the url for the site if I know guid?
I currently have this code to get all sites within a site collection.
private void getSites() { SPSite oSiteCollection = SPContext.Current.Site; SPWebCollection collWebsite = oSiteCollection.AllWebs; for (int i = 0; i < collWebsite.Count; i++) { ddlParentSite.Items.Add(new ListItem(collWebsite[i].Title, collWebsite[i].ID.ToString())); } }
Thanks in advance.
source share