70-573 · Question #225
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…
The correct answer is C. Add the following line of code at line 11. See the full explanation below for the reasoning.
Question
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 05 Dim web As SPWeb = site.OpenWeb() 06 07 ... 08 Catch 09 10 Finally 11 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?
Options
- AAdd the following line of code at line 06.
- BAdd the following line of code at line 09.
- CAdd the following line of code at line 11.
- DAdd the following line of code at line 11.
How the community answered
(45 responses)- A2% (1)
- B4% (2)
- C82% (37)
- D11% (5)
Community Discussion
No community discussion yet for this question.