70-573 Exam Details

  • Exam Code
    :70-573
  • Exam Name
    :TS: Office SharePoint Server, Application Development (available in 2010)
  • Certification
    :Microsoft Certifications
  • Vendor
    :Microsoft
  • Total Questions
    :280 Q&As
  • Last Updated
    :Feb 06, 2022

Microsoft 70-573 Online Questions & Answers

  • Question 131:

    You have a SharePoint site collection. The root Web of the site collection has the URL http://intranet.

    You plan to create a sandboxed 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.)

    01 SPSite currentSite = new SPSite("http://intranet"); 03 Label currentTitle = new Label();

    04 currentTitle.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();
    B. Add the following line of code at line 02: currentSite.OpenWeb("http://intranet");
    C. Change line 01 to the following code segment: SPSite currentSite = SPContext.Current.Site;
    D. Change line 04 to the following code segment: currentTitle.Text = currentSite.OpenWeb().Title;

  • Question 132:

    You have the following event receiver. (Line numbers are included for reference only.)

    01 public override void FieldDeleting(SPListEventProperties properties)

    02 {

    03 base.FieldDeleting(properties);

    05 if (properties.FieldName == "Status")

    06 {

    09 }

    10 }

    You need to cancel the operation and redirect the user to a custom error page if the name of the deleted field is Status.

    Which code segments should you add at lines 07 and 08?

    A. 07 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl ; 08 properties.RedirectUrl - "/_layouts/ customErrorPage.ospx ";
    B. 07 properties. RedirectUrl = "/ layouts/custoroErrorPage. aspx "; 08 properties.Cancel = true;
    C. 07 properties.ErrorMessage = "
    D. 07 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl ; 08 properties.ErrorHessage = " `_/ layouts/customErrorPage.aspx ' />";

  • Question 133:

    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 Which code segment should you add at line 03?

    A. site.AllWebs[1].Files
    B. Site.RootWeb.Lists[0].Items
    C. web.Files
    D. web.RootFolder.SubFolders[0].Files web.Users.Add(currentUser.LoginName, currentUser.Email, currentUser.Name, "")

  • Question 134:

    You have a Microsoft .NET Framework console application that uses the SharePoint client object model.

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

    01 ClientContext cCtx = new ClientContext("http://intranet/hr"); 02 List sharedDocList = cCtx.Web.Lists.GetByTitle("Shared Documents");

    03 CamlQuery camlQuery = new CamlQuery();

    04 camlQuery.ViewXml =

    05 @"

    06

    07

    08

    10 Doc1.docx

    11

    12

    13

    14 ";

    15 ListItemCollection docLibItems = sharedDocList.GetItems(camlQuery);

    16 cCtx.Load(sharedDocList);

    17 cCtx.Load(docLibItems);

    18 cCtx.ExecuteQuery();

    You need to ensure that the application queries Shared Documents for a document named Doc1.docx.

    Which code element should you add at line 09?

  • Question 135:

    You need to create a Web Part that creates a copy of the out-of-the box Contribute permission level.

    Which code segment should you implement in the Web Part?

    A. Dim myRole As New SPRoleDefinition() myRole.Name = "Contribute" SPContext.Current.Web.RoleDefinitions.Add(myRole)
    B. Dim myRole As New SPRoleDefinition(SPContext.Current.Web.RoleDefinitions("Contribute")) myRole.Name = "MyContribute" SPContext.Current.Web.RoleDefinitions.Add(myRole)
    C. Dim myRole As New SPRoleDefinition(SPContext.Current.Web.RoleDefinitions("MyContribute")) myRole.Description = "Contribute" SPContext.Current.Web.RoleDefinitions.Add(myRole)
    D. Dim myRole As New SPRoleDefinition(SPContext.Current.Web.RoleDefinitions("MyContribute")) myRole.Name = "Contribute" SPContext.Current.Web.RoleDefinitions.Add(myRole)

  • Question 136:

    You need to programmatically add a user named User1 to a group named Group1. You write the following code segment. (Line numbers are included for reference only.)

    01 Dim login As String = "User1"

    02 Dim grpName As String = "Group1"

    03 Dim user As SPUser = SPContext.Current.Web.EnsureUser(login)

    04 Dim group As SPGroup = SPContext.Current.Web.Groups(grpName) 06 group.Update()

    Which code segment should you add at line 05?

    A. group.AddUser(user)
    B. group.Owner = user
    C. user.AllowBrowseUserInfo = True
    D. user.Update()

  • Question 137:

    You plan to create two Web Parts named Products and ProductDetails. You create an interface that contains the following code segment. Public Interface Interface1 Property Productid As String End Interface

    You need to ensure that the Products Web Part sends Productid to the ProductDetails Web Part. You must achieve this goal by using the ASP.NET Web Part connection framework. What should you do?

    A. Implement Interface1 in the Products Web Part.
    B. Implement Interface1 in the ProductDetails Web Part.
    C. Add a private set-accessor-declaration to the Productid property.
    D. Add a protected set-accessor-declaration to the Productid property.

  • Question 138:

    You create a sandboxed 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.exe
    B. spucworkerprocess.exe
    C. w3wp.exe
    D. spucworkerprocessproxy.exe

  • Question 139:

    You need to create a Web Part that displays all of the content created by a specific user.

    You write the following code segment. (Line numbers are included for reference only.)

    01 private void keywordQueryExecute(string searchAuthor)

    02 {

    03 KeywordQuery kRequest = new KeywordQuery(ServerContext.Current); 05 kRequest.QueryText = strQuery;

    06 ResultTableCollection resultTbls = kRequest.Execute();

    07 }

    Which code segment should you add at line 04?

    A. string strQuery = "author:" + searchAuthor;
    B. string strQuery = "docID:" + searchAuthor;
    C. string strQuery = "SELECT Title, Rank, Write, Url FROM SCOPE() WHERE author = " + searchAuthor;
    D. string strQuery = "SELECT Title, Rank, Write, Url FROM SCOPE() WHERE docID = " + searchAuthor;

  • Question 140:

    You create a list named List1.

    You create two workflows named WF1 and WF2 for List1.

    You need to ensure that when a new item is created in List1, WF1 starts automatically. WF2 must start automatically after WF1 completes.

    What should you do?

    A. Add a SendActivity activity to WF2.
    B. Add a Replicator activity to WF2.
    C. Create a SPWebEventReceiver event receiver.
    D. Create a SPWorkflowEventReceiver event receiver.

Tips on How to Prepare for the Exams

Nowadays, 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.