1.
You have a Microsoft Windows SharePoint Services site.
You need to write the custom code that runs each time a new functionality is added to the site.
Which class and method should you implement?
2.
You are creating a custom site definition for a Microsoft Windows SharePoint Services site. You define a document library as a part of the custom site definition.
You need to set the default document type as a Microsoft Office Excel 2007 spreadsheet file for any new instances of the document library.
What should you do?
3.
You create a Microsoft Windows SharePoint Services site.
You need to move a menu item to the top of the Quick Launch menu.
Which method should you use?
4.
You create a Microsoft Windows SharePoint Services application. Your company creates two SharePoint sites named Site1 and Site2 in the same Web application.
You write the following code segment.
Private site1 As SPWeb = _
(New SPSite("http: //localhost/Site1")).OpenWeb()
Private site2 As SPWeb = _
(New SPSite("http: //localhost/Site2")).OpenWeb()
You need to copy a custom cross-site group named CrossSite from Site1 to Site2.
Which code segment should you use?
5.
You are creating a Web Part for a Microsoft Windows SharePoint Services site named Site1. You install a feature named TimeFeature on Site1.
You write the following code segment.
Dim site As SPSite = New SPSite("http://server/site1")
Dim web As SPWeb = site.OpenWeb
You need to display the current time to the user only if the TimeFeature feature is activated on Site1.
Which code segment should you use?
6.
You are creating a Microsoft Windows SharePoint Services application that uses a tasks list.
The application must notify the project manager each time a new task is inserted into the tasks list. You write an event receiver in the class named TaskEventClass and compile the class in the assembly named
TaskEventAssembly.
You need to register the event receiver. You also need to ensure that the event receiver is fired only when an item is added to the tasks list.
Which code segment should you use?
7.
You are creating an administrative Web Part for a Microsoft Windows SharePoint Services application.
You write the following code segment.
Dim mySPFarm As SPFarm = SPWebService.ContentService.Farm
Dim mySPServerCollection As SPServerCollection = mySPFarm.Servers
Dim contentDatabases As ArrayList = New ArrayList ()
You need to add the names of the content databases for non-administrative sites that are available within the server farm to the ArrayList object.
Which code segment should you use?
8.
You create a Web Part and deploy the Web Part to a Windows SharePoint Services site named Site1. You create a feature named MyFeature.
You write the following code segment.
Private site As SPSite = New SPSite("http://server/site1") _
Private web As SPWeb = site.OpenWeb()
You need to activate the feature only on Site1 when the Web Part is loaded.
Which code segment should you use?
9.
You have a site that utilizes the built-in team site definition.
You define a function named EnableSitesandLists. The function will take an SPWeb object of the site that you want to navigate to.
You need to ensure that your site navigation displays a listing of child sites and lists.
Which code segment should you use?
10.
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?