Which code segment should you use?

You are developing an ASP.NET web page that includes a Panel Control that has ID ContentSection.
You need to add a text box control to the Panel control.
Which code segment should you use?

You are developing an ASP.NET web page that includes a Panel Control that has ID ContentSection.
You need to add a text box control to the Panel control.
Which code segment should you use?

A.
this.ContentSection.Controls.Add(
this.FindControl(contentSection.ID + “asp:TextBox”));

B.
this.LoadTemplate(“asp:TextBox”)
.InstantiateIN(ContentSection);

C.
this.RequiresControlState(
this.LoadControl(typeof(TextBox),null));

D.
this.ContentSection.Controls.Add(
this.LoadControl(typeof(TextBox),null));



Leave a Reply 0

Your email address will not be published. Required fields are marked *