I have List created in the Parent Web and created a Visual WebPart to pull the data from the list and display. When I add the same WebPart in the SubSite pages the data is not populating to display. When I try the following condition:
String siteUrl = SPContext.Current.Web.ParentWeb.Url; //Featch the top site url
data is populating in the SubSites and not display in the Parent site.
How can I conditionally change the site url path for Parent site and Sub sites to refer the list created in Parent site.
0 commentaires:
Enregistrer un commentaire