1
vote
2answers
65 views

Site Collection Allwebs for current user

I need to iterate to all the web of a site collection using the current user permission. I tried: foreach (SPWeb web in site.AllWebs) { if ...
0
votes
0answers
16 views

Is it possible to move a publishing site collection to a sub site

I am working on SharePoint 2013 web application. I have a site collection of type publishing-->enterprise wiki. I read on this link that moving a site collection to be a subsite is not possible ...
0
votes
2answers
118 views

Create a new site collection c#

I'm trying to create a new site collection in Sharepoint Online tenant with Visual Studio. 1) I found http://msdn.microsoft.com/en-us/library/office/ms448720(v=office.14).aspx which says that the ...
1
vote
2answers
150 views

Retrieve all site collections

I want to retrieve all site collections in an Online tenant through Visual Studio: I can do it via Powershell: get-sposite on-premise server : Get-SPSite on-premise again: var sites = ...
0
votes
1answer
54 views

Root site collection token in appending html

I have following code builder.AppendFormat("<img style='border:0; left:-0px !important;position:absolute;' id='AddQuickTagImg_{0}' alt=\"{1}\" src='<% $SPUrl:~sitecollection/Style ...
1
vote
1answer
30 views

Site collection not created programmatically only in LIVE Server

I am using SharePoint 2007 and was not able to create site collection and add sites pro grammatically using c# code. Some times it creates the site collection and some times it doesn't. works fine ...
0
votes
0answers
52 views

Filter the list in sharepoint online?

I have a sharepoint list . There are 4 people(not fixed) from separate groups(say A,B) responsible for each issue. Now I've a requirement according to which, 1.I'll have to design a page display the ...
1
vote
1answer
256 views

Looping through all the document libraries and modify the items

I have here a piece of code which loops through the all site collections and webs and lists to find particular and modify some items: foreach (SPSite site in webApp.Sites) { ...
0
votes
1answer
164 views

Creating SPSiteCollection, top level site programmatically

I have been given a task to create an event that dynamically creates new site collections on our sharepoint webApp. Thing is using Central Admin I can create "http://testsite.com/sites/newSite_1" and ...
0
votes
1answer
333 views

Creating a site programmatically - folder does not exist on server

I'm trying to create a site programmatically using a console application, but have been getting an exception whenever I try to add a new SPWeb "The folder that would hold URL'/sites/[sitename]' does ...
1
vote
2answers
545 views

How to get all SharePoint Web Applications in the Central Administration Page from code behind

How can I have the list of all existing SharePoint Web Applications and their site collections from code behind .
0
votes
3answers
369 views

Site Collections <target user> is a member of

There is already a webpart for this but it shows subsites etc, which is not the requirement. What I need is a webpart that will list the Site collections a target user is a member of, and it must be ...
1
vote
1answer
812 views

Getting Web Template Not Found error while importing

I am importing a exported site with several sub-sites to a new Site Collection of its Own but getting following error Start Time: 8/9/2012 9:32:31 AM. Progress: Initializing Import. ...
0
votes
1answer
15 views

Site Features in Sub Webs Confusion

Very Basic but confusing question. I see we have three types of features, Web Application Features Site Collection Features Site Features Now I know that Web application features belong to web ...
1
vote
1answer
199 views

Getting Web Template using Configuration ID

I am able to get Web template by checking its ID, but we have ten's of web configurations within a web template so in short we have loads of web template id's with different configurations and Title. ...
0
votes
1answer
757 views

how to Find Template Name that has been used while creating a new Site Collection

I have like tens of custom Site definitions, so when I try to create a new site collection I select a template name, let say "ABCD 2020 DEVELOPMENT ISSUE SOLVED" and create a new site based on this ...
7
votes
3answers
1k views

Moving a site to a different site collection

I am looking for a C# script that will move a site with all permissions and content to another site collection. Google isn't helping me or maybe i dont know what exactly to look for. e.g. I have a ...
0
votes
1answer
378 views

Creating Custom Site Navigation for SharePoint 2007

I want to create Custom Site Navigation "Breadcrumb navigation" which will show where a user came from, ATM I am using default Navigation that shows where this specific web is located in the site ...
3
votes
1answer
1k views

how to check if a webpart already exists on a page or not

I am adding three webparts with different titles to a given page url, but I need to check if webpart is already on page or not, here is the code i am using atm to add webpart to the page. using ...
4
votes
3answers
3k views

How to add event receivers to all the lists in a site collection?

What is the best practice around adding event receivers across all the lists in a Site Collection?
6
votes
4answers
10k views

How can I get the root site collection from SPContext.Current?

With SPContext.Current I can get the current site or current web. However, I would like to get the root site collection for my current web application. I know that I can get the web application from ...
3
votes
4answers
3k views

Get SPWeb by ID without Site Collection?

I have a list of SPWeb IDs and would like to open the associated SPWeb objects. However, I do not know in which Site Collection they are (I DO know that they are in the current Web Application ...