Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |
Showing posts with label Feature Receiver. Show all posts
Showing posts with label Feature Receiver. Show all posts

Tuesday, June 26, 2012

Feature Receivers in SharePoint 2007/2010/2013

When used it:
The Feature Receivers can be used If you want to perform any action programmatically using C# code like when feature is installed, uninstalled, activated or deactivated.
e.g. I will share one of my best experience about on feature receivers when it’s most required.
Task: I want to develop one custom master page and set that master page as default master page to the site.
Sol: Below are my development approaches on it.
  1. First created a custom master page using existing master page through SharePoint designer.
  2. Deployed that custom master page to the master page gallery using “Feature”.
  3. Finally, write c# code to set our masterpage as default master to the site using “feature receiver”[means I wrote c# code to set our custom master page as default master page inside of “FeatureActivated” event]. Here the feature receiver will run whenever the feature is activated.