Which code segment should you use?
You are creating a site on a SharePoint 2007 server. You write the following code segment:
01: Public Function GetUserProperties() As String
02: Dim usersWithNoTitles as String = New String(“”)
03: Dim site as SPSite = new SPSite(“http://sitename”)
04: Try
05: Dim web as SPWeb = site.OpenWeb
06: Try
07: Dim profMan as UserProfileManager = New UserProfileManager
08: …
09: Finally
10: CType(web.iDisposable).Disposable()
11: End Try
12: Finally
13: CType(site.iDisposable).Disposable()
14: End Try
15: Return usersWithNoTitles
16: End Function
You need to display a list of users in the site who have blank titles.
Which code segment should you use?
Which method should you pass the range variable?
You have a web part that uses Excel Web Services to open a published Microsoft Office Excel workbook. You need to calculate formulas in the workbook for a range. You write the following line of code:
01: Dim range as String = “Sheet1!A1:F17”
Which method should you pass the range variable?
What should you do to to ensure that the web parts use the new style sheet?
You are modifying a Microsoft Office SharePoint Server 2007 Search Center site. You create a customized XSLT style sheet. You change the parent of 10 core search result web parts on separate site tabs. You need to ensure that the web parts use the new style sheet.
There are two possible ways to achieve this goal. (Each answer represents a complete solution. Choose two.)
Where should you add the data connection library?
You have a data connection library. You need to ensure that users can create and display Microsoft Office Excel workbooks that use data sources stored in the data connection library.
Where should you add the data connection library?
What should you do?
You are creating an enterprise search web part. You need to ensure that key words are highlighted only for the first five sentences of each search result.
What should you do?
Which code segment should you insert at line 13?
You are creating a Microsoft Office SharePoint Server 2007 Web Part.
You write the following code segment. (Line numbers are included for reference only.)
01 public Button cmdCrawl;
02 protected override void CreateChildControls()
03 {
04 cmdCrawl = new Button();
05 cmdCrawl.Click += new EventHandler(cmdCrawl_Click);
06 cmdCrawl.Text = “Update Index”;
07 }
08 public void cmdCrawl_Click(object sender, EventArgs e)
09 {
10 Microsoft.Office.Server.Search.Administration.Content sspContent =
11 new Microsoft.Office.Server.Search.Administration.Content
12 (SearchContext.Current);
13 …
14 }
You need to ensure that the Web Part initiates a search crawl of a scope named Patents.
Which code segment should you insert at line 13?
What should you do?
You are customizing a Search Center Web site on a Microsoft Office SharePoint Server 2007 site collection. You add a new column named CompletionDate to your search results. You need to ensure that the search terms entered by users appear highlighted in the CompletionDate column. What should you do?
What should you do?
You create a Microsoft Office SharePoint Server 2007 Search Center site. The site has a custom tab that restricts users to a Business Data Connector for a Product tracking system.
You need to restrict the data displayed to items from the custom columns named ProductName, ProductNumber, and ProductColor.
What should you do?
Which method of the UserProfileService object should you use?
Your company uses a Microsoft Office SharePoint Server 2007 site that has user profiles enabled. Your company also uses a Web-based human resources (HR) application that runs on a different server. The HR department wants to display the user profile data from the SharePoint site in the Web-based application.
You need to retrieve the user profile information from within the Web-based application.
Which method of the UserProfileService object should you use?
What should you do?
You have a Microsoft Office SharePoint Server 2007 site. You create a Microsoft Office Excel 2007 workbook that contains the telephone numbers of all your company locations. You need to ensure that users can filter the Excel 2007 workbook on the basis of company locations by using Excel Services in Microsoft Office SharePoint Server 2007. What should you do?