Programatically Getting url of site
SPSite osite = new SPSite(Request.QueryString["SiteURL"]);
SPWeb rWeb = osite.RootWeb;
//siteName.Text = rWeb.Title;
SPWeb oweb = osite.OpenWeb();
// webName.Text = oweb.Title;
SPList ilist = oweb.Lists[new Guid(Request.QueryString["ListID"])];
SPListItem iitem = ilist.GetItemById(Convert.ToInt16(Request.QueryString["ItemId"]));
// listName.Text = ilist.Title;
lblurl.Text = rWeb.Url + "/" + oweb.Title + "/" + ilist.Title;
Comments
Post a Comment