70-573 · Question #81
You create a Web Part that contains the following code segment. (Line numbers are included for reference only.) 01 public class HebPart1: WebPart 02 { 03 public VebPart1() {} 04 05 protected…
The correct answer is B. Add the following code segment to line 08. MNEMONIC RULE: "create Button, then Add Button" Create a Custom Web Part for SharePoint 2010 SharePoint 2010 Visual Web Parts
Question
You create a Web Part that contains the following code segment. (Line numbers are included for reference only.) 01 public class HebPart1: WebPart 02 { 03 public VebPart1() {} 04 05 protected override void CreateChildControlst) 06 { 07 Button clickButton = new Button(); 08 09 base.CreateChildControls(); 10 ] 11 12 protected override void BenderContents(HtrolTextWriter writer) 13 { 14 15 base.RenderContents(writer); 16 } 17 } You discover that the clickButton button does not appear. You need to ensure that the clickButton button appears. What should you do?
Options
- ADelete line 09.
- BAdd the following code segment to line 08:
- CMove the code segment from line 07 to line 14.
- DAdd the following code segment to line 14:
How the community answered
(28 responses)- A4% (1)
- B86% (24)
- C4% (1)
- D7% (2)
Explanation
MNEMONIC RULE: "create Button, then Add Button" Create a Custom Web Part for SharePoint 2010 SharePoint 2010 Visual Web Parts
Topics
Community Discussion
No community discussion yet for this question.