nerdexam
Microsoft

70-573 · Question #147

70-573 Question #147: Real Exam Question with Answer & Explanation

The correct answer is C. Change line 01 to the following code segment.. See the full explanation below for the reasoning.

Question

You have a SharePoint site collection. 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.) 02 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?

Options

  • AAdd the following line of code at line 02.
  • BAdd the following line of code at line 02.
  • CChange line 01 to the following code segment.
  • DChange line 04 to the following code segment.

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice