Tag Info

Hot answers tagged

2

Try this : using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList oList = web.Lists.TryGetList("listname"); if(oList != null) { foreach(Field field in oList.Fields) { ...


1

This has worked for me in the past: private SPListItem CreateLinkToDocumentPage(SPWeb web, SPList docLibrary, string pageName, string url) { SPContentType contentType = web.AvailableContentTypes[SPBuiltInContentTypeId.LinkToDocument]; //get full path of the document to add string filePath = docLibrary.RootFolder.ServerRelativeUrl; SPFolder ...


1

You can create site collections in SharePoint Online with C# using the client side object model. You will need to install the SharePoint client SDK first which includes the CSOM libraries and the all important Microsoft.Online.SharePoint.Client.Tenant.dll. There is a full walkthrough on how to get the client SDK and use the CSOM libraries with C# to create ...


1

Start the Url with slash <UrlAction Url="/_admin/target.aspx"/>


1

off the top of my head, I dont know but i think there is most certanly a easyier solution than what im about to propose, using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList list = web.Lists.TryGetList("listname"); SPQuery query = new ...



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