Tag Info

Hot answers tagged


You're missing the WebId property: var xlv = new XsltListViewWebPart(); using (var oSite = new SPSite(" http : / / app:3333/ ")) { using (var oWeb = oSite.OpenWeb("/ProxymIT/Direction")) { var oList = oWeb.Lists["AdministrativeNotes"]; //your list name xlv.WebId = oWeb.ID; xlv.ListId = oList.ID; xlv.ViewGuid = ...


You can get the ID through GetLimitedWebPartManager method You need file URL, the scope and something to filter by. Here is an example: _api/Web/GetFileByServerRelativeUrl('/sites/test/Home.aspx')/GetLimitedWebPartManager(scope=1)/WebParts?$expand=WebPart&$filter=WebPart/Title+eq+'Test'


You can use below code var page = "pageurl"; var limitedManager = SPContext.Current.Web.GetLimitedWebPartManager(page, PersonalizationScope.Shared); //Replace WebPartClass with your webpart class name var webPart = limitedManager.WebParts.OfType<WebPartClass>().FirstOrDefault(); var text = webPart.OptionalText; Not each user can personalize the web ...


Below Code Reads the SiteUrls from Text file called SiteUrls.txt, and add library called "Oct Invoicing 2014" to the Wikipage called "Billing_Req.aspx" Here we are taking variable i to check for the library already present on the page, if present we are incrementing i to 1 and else its default value =0 If i=0 means webpart is not present on the page and it ...


Recently I use FullCalendar, a free JavaScript based solution with a lot of references, samples in SharePoint (like this, this, this, this or this), and a great amount of flexibility and customizations. However, if you are looking for a complete solution and would not like to bother with CSS and JavaScript, then this tool is not ideal for you.


Use SharePoint Manager 2010 from CodePlex and you can browse through your sites and track down where it has reference. Directly deleting data from DB will put you in unsupported. also check this one http://leonidius2010.wordpress.com/2011/09/13/sharepoint-2010-finding-missingsetupfile/ Another method is using the powershell: ...


You can start a workflow programmatically with the code from here private SPWorkflowAssociation GetWorkflowAssociationByName(SPListItem item, string workflowAssociationName) { return item.ContentType.WorkflowAssociations.GetAssociationByName(workflowAssociationName, new System.Globalization.CultureInfo("en-US")); } public void ...

Only top voted, non community-wiki answers of a minimum length are eligible