Which code segment should you add at line 04?
You create a Web Part. You need to display the number of visits to a SharePoint site collection in
a label named LblVisits. You write the following code segment. (Line numbers are included for
reference only.) 01 RunWithElevatedPrivileges(ElevateSub) 02 Private Sub ElevatedSub() 03 Try
04 05 LblVisits.Text = site.Usage.Visits.ToString() 06 Finally 07 … 08 End Try 09 End Sub Which
code segment should you add at line 04?
What should you configure?
You have a SharePoint site that contains 10 lists. You need to prevent a list named List1 from
appearing on the Quick Launch navigation bar. What should you configure?
Which namespace should you use?
You are developing an application page. You need to create a pop-up window that uses the
ECMAScript object model. Which namespace should you use?
Which code segment should you use?
You have a SharePoint site that has the URL http://contoso.com/hr.You are creating a new Web
Part. You need to create a reference to the current subsite without having to dispose of any
returned objects. Which code segment should you use?
You need to ensure that the Web Part activates a Feature in the subsite without causing a memory leak.Which co
You are creating a Web Part. The Web Part will be used in a SharePoint subsite that has the URL
http://www.contoso.com/hr.You need to ensure that the Web Part activates a Feature in the
subsite without causing a memory leak.Which code segment should you use?
What should you implement in WPMaster?
You are creating two Web Parts named WPMaster and WPDetails. You need to ensure that when
an item is selected from WPMaster, the details of the item are displayed in WPDetails. This must
occur without requiring WPDetails to retrieve the existing item from the data source. What should
you implement in WPMaster?
Which property should you use?
You create a custom site definition named DCS. You create a site provision handler for DCS.
DCS contains a file named DCSTemplate.xsd that stores configuration data. You need to read the
content of DCSTemplate.xsd in the site provision handler. Which property should you use?
Which tool should you use?
You create a custom Web Part. You need to verify whether the Web Part causes any memory
leaks. Which tool should you use?
You need to ensure that all SharePoint solutions are validated the next time the solutions are executed
You update a solution validator. You need to ensure that all SharePoint solutions are validated the
next time the solutions are executed. What should you do?
Which code segment should you add at line 03?
You have a SharePoint site collection that contains 100 subsites. You plan to create a Web Part.
The Web Part will be deployed to each subsite. You need to ensure that the Web Part retrieves all
of the files in the root directory of the current subsite. You write the following code segment. (Line
numbers are included for reference only.) 01Dim site As SPSite = SPContext.Current.Site 02Dim
web As SPWeb = SPContext.Current.Web 03 Which code segment should you add at line 03?