PrepAway - Latest Free Exam Questions & Answers

Category: 70-573

Exam 70-573: TS: Microsoft SharePoint 2010, Application Development

What should you add to the schema of the action?

You are creating a custom workflow action to be used in Microsoft SharePoint Designer reusable workflows.

The action programmatically creates a SharePoint site named Site1 at a specific URL. The workflow actions schema file contains the following code segment.

<WorkflowInfo>
<Actions Sequential=”then” Parallel=”and”>
<Action Name=”Create Site”
ClassName=”SPDActivityDemo.CreateSite”
Assembly=”SPDActivityDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1a4a7a2c3215a71b”
AppliesTo=”all”
Category=”Test”>
<Parameters>
<Parameter Name=”Url” Type=”System.String, mscorlib” Direction=”In” />
<Parameters>
</Action>
</Actions>
</WorkflowInfo>

You need to ensure that users can specify the URL property of the action in SharePoint Designer.

What should you add to the schema of the action?

Which property should you use?

You add a delegate control to the <head> section of a custom master page. You reference a default script file by using the delegate control.

You need to ensure that the delegate control meets the following requirements:

* Prevents other developers from deleting the default script reference
* Provides developers with the ability to add additional script references
* Provides developers with the ability to change the order of the script references

Which property should you use?

Which code segment should you add at line 05?

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 SPSecurity.RunWithElevatedPrivileges(delegate()
02 {
03 try
04 {
05
06 LblVisits.Text = site.Usage.Visits.ToString();
07 }
08 finally
09 {
10
11 }
12 });

Which code segment should you add at line 05?

What should you do?

You create a Web Part that programmatically updates the description of the current SharePoint site.

The Web Part contains the following code segment. (Line numbers are included for reference only.)

01 SPSecurity.RunWithElevatedPrivileges(delegate()
02 {
03 SPSite currSite = SPContext.Current.Site;
04 SPWeb currWeb = SPContext.Current.Web;
05 using (SPSite eSite = new SPSite(currSite.ID))
06 {
07 using (SPWeb eWeb = eSite.OpenWeb(currWeb.ID))
08 {
09 eWeb.AllowUnsafeUpdates = true;
10 currWeb.Description = “Test”;
11 currWeb.Update();
12 eWeb.AllowUnsafeUpdates = false;
13 }
14 }
15 });

Users report that they receive an Access Denied error message when they use the Web Part. You need to ensure that all users can use the Web Part to update the description of the current site.

What should you do?


Page 8 of 18« First...678910...Last »