You are creating an event receiver. The event receiver will have a field named Title and a field named Priority.
You write the following code segment for the event receiver. (Line numbers are included for reference only.)
01 public override void ItemUpdating(SPItemEventProperties prop)
02 {
02 base.ItemUpdating(prop);
07 }
You need to ensure that when the Title field is changed to include the word IMPORTANT, the Priority field is set to URGENT.
Which code segments should you add at lines 03, 04, 05, and 06?
A. 03 if (prop.AfterProperties["vti_title"].ToString().Contains("IMPORTANT")) 04 { 05 prop.AfterProperties["Priority"] = "URGENT"; 06 }You deploy a custom Web Part named WebPart1 to a SharePoint site. WebPart1 contains the following code segment. (Line numbers are included for reference only.)
01Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
02 Dim site As SPSite = Nothing
03 Try
04Dim site As New SPSite("http://www.contoso.com/default.aspx")
05 Dim web As SPWeb = site.OpenWeb()
07 ...
08 Catch
10 Finally
12 End Try
13End Sub
After you deploy WebPart1, users report that the pages on the site load slowly. You retract WebPart1 from the site. Users report that the pages on the site load without delay. You need to modify the code in WebPart1 to prevent the pages
from loading slowly. What should you do?
A. Add the following line of code at line 06. site.ReadOnly = TrueYou create an entity named Customer in a Business Connectivity Services (BCS) object mode. You need to ensure that Customer data can be displayed in a Business Data List Web Part. Which method type should you use?
A. GenehclnvokerYou need to disable the CriticalExceptionCount measure for all sandboxed solutions.
You write the following code segment. (Line numbers are included for reference only.)
01 SPUserCodeService userCode = SPUserCodeSecvi.ee. Local;
02 SPResourceHeasureCollection measures = userCode.ResourceHeasures ;
03 SPResourceHeasure measure = measures [" CriticalExc eptionCounc "] ; 05 measure.Update ();
Which code segment should you add at line 04?
A. measure.ResourcesPerPoint = 1;You have a SharePoint site. The current master page of the site is v4.master. You create a custom master page named MyMasterPage.master.
You deploy the master page to /_catalogs/masterpage/.
You need to apply the custom master page to only the content pages of the site.
What should you do?
A. Rename the custom master page as v4.master and overwrite /_catalogs/masterpage/v4.master.You create custom code to import content to SharePoint sites.
You create a custom site definition by using Microsoft Visual Studio 2010.
You need to ensure that when a new site that uses the custom site definition is created, the custom code executes after the site is created.
Which class should you add to the project?
A. SPEmailEventReceiverYou 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 override void CreateChildControls () 02 {
03 base.CreateChildControls ();
04 SPSecurity.FunWithElevatedPrivileges (
05 delegate
06 {
07 Label ListCount = new Label ();
08 ListCount.Text = String.Format
("There are {0> Lists", SPContext.Current.Heb.Lists.Count );
09 Controls.Add ( ListCount ) ;
10 }}
11 }
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. 04You have a list named Projects that contains a column named ClassificationMetadata.
You need to create a Web Part that updates the ClassificationMetadata value to NA for each item in the Projects list.
You write the following code segment. (Line numbers are included for reference only.)
01 foreach (SPListItem currentItem in SPContext.Current.Web.Lists["Projects"].
Items)
02 {
04 }
Which code segment should you add at line 03?
A. currentItem["ClassificationMetadata"] = "NA";You have a Web application that contains the following code segment.
Private Sub CreatingSPSite()
Dim siteCollection As SPSite = Nothing
Try
siteCollection = New SPSite("http://contoso.com")
Finally
End Try
End Sub
You need to prevent the code segment from causing a memory leak. Which code segment should you add?
A. if (siteCollection != null) { siteCollection.Close(); }You create a SharePoint farm solution that contains a Web Part. You need to debug the Web Part by using Microsoft Visual Studio 2010. To which process should you attach the debugger?
A. owstimer.exeNowadays, 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.