Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In the case when we need to get the absolute url for any item, we can make use of the instance method SPSite.MakeFullUrl.
Example use,-
using(SPSite site = new SPSite(mysiteurl))
{ using(SPWeb web = site.OpenWeb())
{
//.. Other lines of code
string absoluteURL = site.MakeFullUrl(serverRelativeURL);
}
}