You create a custom Web Part.
You need to create a class to log Web Part errors to the Unified Logging Service (ULS) logs.
What should you use?
A. the ILoggingProvider interfaceYou have a SharePoint site collection. The root Web of the site collection has the URL http://intranet.You plan to create a user solution that will contain a Web Part. The Web Part will display the title of the root Web. You write the following
code segment for the Web Part.
(Line numbers are included for reference only.)
01Dim currentSite As New SPSite("http://intranet") 03Dim currentTitle As New Label()
04currentTitle.Text = currentSite.RootWeb.Title
You add the Web Part to a page in the root Web and receive the following error message:
"Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred." You need to prevent the error from occurring. What should you do?
A. Add the following line of code at line 02. currentSite.OpenWeb()You need to create a Web Part that hides the out-of-the-box Ribbon on the current page. Which code segment should you include in the Web Part?
A. SPRibbon.GetCurrent(me.Page).CommandUIVisible = falseYou plan to create one provider Web Part and two consumer Web Parts.
You need to ensure that the consumer Web Parts can receive data from the provider Web Part.
You create an interface that contains the following code segment:
public interface Interfacel
{
string Pararoeterl { get; set; }
}
What should you do next?
A. Create a set accessor for Parameterl.You have one Web application that contains several SharePoint site collections.
You need to add a custom button to the Documents tab on the Ribbon of one site collection only.
What should you do?
A. Create a new Feature. In a new node, specify the location of Ribbon.Tabs._children.You have a Web application named WebApp1.
You have a Feature receiver named FeatureReceiver1. FeatureReceiver1 stores a connection string in the web.config file of WebApp1.
You need to ensure that when FeatureReceiver1 makes configuration changes to web.config, the changes are automatically replicated to all Web servers in the farm.
Which class should you use in FeatureReceiver1?
A. SPPersistedObjectYou are creating a Web Part for SharePoint Server 2010. The Web Part contains the following code segment. (Line numbers are included for reference only.)
01 Protected Overloads Overrides Sub CreateChildControls()
02 MyBase.CreateChildControls()
03 SPSecurity.RunWithElevatedPrivileges(ElevatedCode) 05 End Sub
06 Private Sub ElevatedCode()
07 Dim ListCount As New Label()
08 ListCount.Text = [String].Format
("There are {0} Lists", SPContext.Current.Web.Lists.Count)
09 Controls.Add(ListCount)
10 End Sub
You need to identify which line of code prevents the Web Part from being deployed as a sandboxed solution.
Which line of code should you identify?
A. 02You have a Web Part named WebPart1. WebPart1 runs on a Microsoft Office SharePoint Server 2007 server. You need to ensure that WebPart1 can run as a sandboxed solution in SharePoint Server 2010. What should you do?
A. Create a new Web Part by using the code from WebPart1.You create a client application that remotely calls the Business Connectivity Services (BCS) object model. You need to create the context that will be used to request a cache refresh. Which code segment should you use?
A. Dim cCtx As BdcService = SPFarm.Local.Services.GetValue(Of BdcService)(String.Empty)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?
A. IWebActionableNowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-573 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.