PrepAway - Latest Free Exam Questions & Answers

You need to ensure that clickButton appears

You create a Web Part that contains the following code segment. (Line numbers are included for
reference only.) 01 Public Class WebPart1 02 Inherits WebPart 03 04 Public Sub New() 05
MyBase.New 06 07 End Sub 08 09 Protected Overrides Sub CreateChildControls() 10 Dim
clickButton As Button = New Button 11 12 MyBase.CreateChildControls 13 End Sub 14 15
Protected Overrides Sub RenderContents (ByVal writer As HtmlTextWriter) 16 17
MyBase.RenderContents(writer) 18 End Sub 19 End Class You discover that the clickButton
button does not appear. You need to ensure that clickButton appears. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Add the following line of code at line 11. clickButton.Page = me.Page

B.
Add the following line of code at line 11. Controls.Add(clickButton)

C.
Delete line 12.

D.
Move line 10 to line 16.


Leave a Reply