Microsoft
70-573 · Question #226
You have a Web Part that contains the following code segment. (Line numbers are included for reference only.) 01Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 03 If True Then…
The correct answer is D. Change line 02 to the following code segment. See the full explanation below for the reasoning.
Question
You have a Web Part that contains the following code segment. (Line numbers are included for reference only.) 01Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 03 If True Then 04 Dim web As SPWeb = site.OpenWeb() 05 06 End If 07End Sub You deploy the Web Part to a SharePoint site. After you deploy the Web Part, users report that the site loads slowly. You need to modify the Web Part to prevent the site from loading slowly. What should you do?
Options
- AAdd the following line of code at line 05.
- BAdd the following line of code at line 05.
- CAdd the following line of code at line 05.
- DChange line 02 to the following code segment.
How the community answered
(26 responses)- A4% (1)
- B12% (3)
- C4% (1)
- D81% (21)
Community Discussion
No community discussion yet for this question.