This quiz tests knowledge on ASP. NET application development using. NET Framework 3.5, focusing on dynamic control handling, data binding, and custom control creation.
Label lbl = Page.FindControl("lblQuantity") as Label;
Label lbl = e.Item.FindControl("lblQuantity") as Label;
Label lbl = rptData.FindControl("lblQuantity") as Label;
Label lbl = e.Item.Parent.FindControl("lblQuantity") as Label;
Rate this question:
Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); this.Controls.AddAt(1, ctrl);
Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); lblHeader.Controls.Add(ctrl);
Add a Literal control named Ltrl between the lblHeader and lblFooter label controls. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx");
Add a PlaceHolder control named PlHldr between the lblHeader and lblFooter label controls. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); PlHldr.Controls.Add(ctrl);
Protected override object SaveViewState() { LoadControls(); return base.SaveViewState(); }
Protected override void Render(HtmlTextWriter writer) { LoadControls(); base.Render(writer); }
Protected override void OnLoadComplete(EventArgs e) { base.OnLoadComplete(e); LoadControls(); }
Protected override void LoadViewState(object savedState) { base.LoadViewState(savedState); LoadControls(); }
Rate this question:
Controls.Add(oFData);
Template.InstantiateIn(this); Template.InstantiateIn(oFData);
Controls.Add(oFData); this.Controls.Add(oFData);
This.TemplateControl = (TemplateControl)Template; oFData.TemplateControl = (TemplateControl)Template; Controls.Add(oFData);
Protected override void CreateChildControls() { Controls.Clear(); OrderFormData oFData = new OrderFormData("OrderForm"); Controls.Add(oFData); }
Protected override void RenderContents(HtmlTextWriter writer) { OrderFormData oFData = new OrderFormData("OrderForm"); oFData.RenderControl(writer); }
Protected override void EnsureChildControls() { Controls.Clear(); OrderFormData oFData = new OrderFormData("OrderForm"); oFData.EnsureChildControls(); if (!ChildControlsCreated) CreateChildControls(); }
Protected override ControlCollection CreateControlCollection() { ControlCollection controls = new ControlCollection(this); OrderFormData oFData = new OrderFormData("OrderForm"); controls.Add(oFData); return controls; }
Rate this question:
Quiz Review Timeline (Updated): Mar 19, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.