foreach (SPListItem item in itemCollections)
{
string Url = item["URL"].ToString();
string[] url=Url.Split(',');
var listUrl = url[0]; //got Absolute URL Here
var List = web.GetList(relativeUrl);
}
Absolute URl:- http://pc6/Surveys/Lists/Surveylist
Loading
Bhushan GawalePosted Jan 15, 2015, 7:38 AM
foreach (SPListItem item in itemCollections)
{
string Url = item["URL"].ToString();
if(!string.IsNullOrEmpty(Url))
{
Uri uri = new Uri(Url);
string absoluteUrl = uri.AbsoluteUri
}
}Anubhav ChaudharyPosted Jan 15, 2015, 5:17 AM
Use this:
HttpContext.Current.Request.Url.AbsolutePath.Remove
(0, listUrl.Length - 1);