Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to deploy the sharepoint 2010 feature in specific single website(not in site collection) programatically whose feature Scope is "Web"? While doing the google search everywhere its refering something like SPSite site = SPContext.Current.Web.Site; Using this feature is deploying in all web in the site collection
Posted

1 solution

SharePoint features will be deployed globally but not activated by default on all sites.

If you want activate the feature on only one site. Make the feature hidden and activate the feature through code or power shell.


To hide a feature update the Hidden attribute of the Feature element to ‘TRUE’ as shown below:

<feature>
Id="AD2146D-62DA-4911-DBC1-AE177DE40084"
Title="Restricted Web Parts"
Hidden="TRUE"
.../>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900