| 70-541 Exam |
| 70-541 - Exam Information |
| Question of the day |
You are creating a Microsoft Windows SharePoint Services application. You create a Windows SharePoint Services feature named MyFeature. You implement the feature within a Microsoft .NET namespace named MyFeature. You create a class named SiteMonitor that inherits from the SPWebEventReceiver class. The SiteMonitor class overrides two methods, named SiteDeleting and WebDeleting. Both methods cancel the deletion process. You need to prevent all users, including site administrators, from deleting the MySite Web site. Which method should you use?
Answer(s)
public void AddReceiver(SPWeb myWeb){myWeb.EventReceivers.Add (SPEventReceiverType.WebDeleting,"M yFeatur e" , "MyFeature.SiteMonitor");}