Latest MCTS 70-573 Dumps Real Exam Download 111-120

Ensurepass

QUESTION 111

You create a custom page layout that contains the following code segment. (Line numbers are included for reference only.)

01 Please enter a number:

02 <SharePointWebControls:InputFormTextBox ID=”NumberTextBox” runat=”server”/>

03 You need to prevent the page from being saved if NumberTextBox is empty. Which code segment should you add at line 03?

 

 

A. <script type=”javascript”>if(document.getElementById(‘NumberTextBox’).value= ”) return false;</script>

B. <script type=”javascript”>if(document.getElementById(‘NumberTextBox’).value= ”) return true;</script>

C. <SharePointWebControls:InputFormCompareValidator ID=”NumberValidator”runat=”server” ControlToValidate=”NumberTextBox”/>

D. <SharePointWebControls:InputFormRequiredFieldValidator ID=”NumberValidator”runat=”server” ControlToValidate=”NumberTextBox”/>

 

Correct Answer: D

 

Explanation/Reference:

MNEMONIC RULE: “InputFormRequiredFieldValidator”

RequiredFieldValidator makes sure you provide a value for the field before the form can be submitted.

 

 

QUESTION 112

You create a custom page layout that contains code-behind.

You need to identify whether the page is in Edit mode or in Display mode.

What should you use?

 

A. SPContext.Current.FormContext

B. SPContext.Current.ListItem.Properties

C. this.Form

D. this.Web.ASPXPageIndexMode

Correct Answer: A

Explanation/Reference:

MNEMONIC RULE: FormContext

Possible values for SPContext.Current.FormContext.FormMode property are Display, Edit, Invalid, and New.

SPFormContext.FormMode Property http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spformcontext_properties.aspx

 

 

QUESTION 113

You create a custom field type and a CustomFieldControl.ascx user control.

You need to write the code-behind of the CustomFieldControl.acsx user control. Which object should you override?

 

A. BaseFieldControl

B. SPFieldCalculated

C. SPFieldText

D. WebPart

 

Correct Answer: A

 

Explanation/Reference:

MNEMONIC RULE: “CustomFieldControl = BaseFieldControl”

Renders a field on a form page (not a list view page) by using one or more child controls such as a label, link, or text box control.

BaseFieldControl Class http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.basefieldcontrol.aspx

 

 

QUESTION 114

You create a custom page layout that has a field control named Field1.

You need to ensure that Field1 is only visible when users modify the contents of the page.

Which parent control should you use for Field1?

 

A. EditModePanel

B. PageLayoutValidator

C. PublishingContext

D. ValidatorAggregator

 

Correct Answer: A

 

Explanation/Reference:

MNEMONIC RULE: “visible when modify = EditModePanel”

Provides a container that shows or hides its child controls based on the mode of the page.

EditModePanel Class http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.editmodepanel.aspx

 

 

QUESTION 115

You create a timer job.

You need to debug the timer job.

To which process should you attach the debugger?

 

A. devenv.exe

B. owstimer.exe

C. spucworkerprocess.exe

D. w3wp.exe

 

Correct Answer: B

Explanation/Reference:

MNEMONIC RULE: “timer job = owstimer.exe”

How to: Debug a Timer Job http://msdn.microsoft.com/en-us/library/ff798310.aspx

 

 

clip_image002

Explanation/Reference:

MNEMONIC RULE: “Execute timer job”

Next, and the most important thing, is to override Execute() method. This method is called each time when the job is fired, so it should contain all the logic to accomplish what You expect from the job.

SPJobDefinition as the way to create scheduled tasks http://tomaszrabinski.pl/wordpress/2010/05/27/spjobdefinition-as-the-way-to-create-scheduled-tasks/

 

 

QUESTION 117

You need to schedule a timer job to run every two hours. Which schedule should you use?

 

A. SPDailySchedule

B. SPHourlySchedule

C. SPMinuteSchedule

D. SPOneTimeSchedule

Correct Answer: C

Explanation/Reference:

MNEMONIC RULE: “SPMinuteSchedule”

SPMinuteSchedule object has Interval property that allows set the interval of the schedule to 120 minutes

(2 hours).

SPHourlySchedule object does not have Interval property, so it can only run a job every hour.

SPMinuteSchedule Members

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spminuteschedule_members.aspx

SPHourlySchedule Members

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.sphourlyschedule_members.aspx

 

 

QUESTION 118

You are creating a Business Connectivity Services (BCS) entity.

You need to ensure that all data returned by the entity is available in search results.

Which type of method instance should you implement?

 

A. Finder and GenericInvoker

B. Finder and IdEnumerator

C. SpecificFinder and GenericInvoker

D. SpecificFinder and IdEnumerator

Correct Answer: D

Explanation/Reference:

MNEMONIC RULE: “BCS data available = SpecifcFinder and IdEnumerator”

A SpecificFinder returns exactly one external item. This stereotype is used to read an item, given its identifier.

Implementing a SpecificFinder http://msdn.microsoft.com/en-us/library/ff464399.aspx

An IdEnumerator method instance on the external system enables you to return the field values that represent the identity of Entity instances of a specific Entity.

Implementing an IdEnumerator http://msdn.microsoft.com/en-us/library/ff464401.aspx

 

 

QUESTION 119

You create a Business Connectivity Services (BCS) object model in Microsoft Visual Studio 2010. The model connects to an XML file.

You create an external list that displays the BCS entity. You need to ensure that users can delete items from the external list.

What should you do?

 

A. Call the SPList.Delete() method.

B. Call the SPListItem.Delete() method.

C. Create a custom method and specify the method as a Deleter method instance.

D. Create a custom method and specify the method as a Disassociator method instance.

 

Correct Answer: C

Explanation/Reference: MNEMONIC RULE: “Deleter method”

XML Snippet: Modeling a Deleter Method http://msdn.microsoft.com/en-us/library/ff464327.aspx

Code Snippet: Execute the Deleter Method Instance of an External Content Type http://msdn.microsoft.com/en-us/library/ff464351.aspx

 

 

QUESTION 120

You create an entity named Customer in a Business Connectivity Services (BCS) object model. You need to ensure that Customer data can be displayed in a Business Data List Web Part. Which method type should you use?

 

A. Finder

B. Genericlnvoker

C. IDEnumerator

D. SpecificFinder

Correct Answer: A

Explanation/Reference:

MNEMONIC RULE: “Finder for all Customer data”

The first method created is ReadItem, which allows you to retrieve a specific record from the external store based on an identifier. This is mapped to the XML metadata as a method instance of type “SpecificFinder.”

The second method that is created is ReadList, which retrieves all records from the external store. This is mapped in the XML metadata as a “Finder” method instance.

These are the minimum two methods that your entity needs to implement in order to serve as a connector for BCS.

Using Business Connectivity Services in SharePoint 2010 http://msdn.microsoft.com/en-us/magazine/ee819133.aspx

 

Download Lates MCTS 70-573 Real Free Tests , help you to pass exam 100%.