Add Controls in runtime
-
Hi All, How to add controls(textbox,dropdownlist and etc)into the webpage in runtime .? And how to handle the events of these controls? Just add the control in form not in Panels Pls give me suggession with sample code. thanks paul Paul -- modified at 3:08 Thursday 20th April, 2006
-
Hi All, How to add controls(textbox,dropdownlist and etc)into the webpage in runtime .? And how to handle the events of these controls? Just add the control in form not in Panels Pls give me suggession with sample code. thanks paul Paul -- modified at 3:08 Thursday 20th April, 2006
Adding Controls to a Web Forms Page Programmatically[^] Creating an Event Handler at Run Time in Web Forms Pages[^] When working with dynamic controls, you should understand the Control Execution Lifecycle[^].
-
Adding Controls to a Web Forms Page Programmatically[^] Creating an Event Handler at Run Time in Web Forms Pages[^] When working with dynamic controls, you should understand the Control Execution Lifecycle[^].
-
Thanks for your sugession. how to add the control into form..(Not in Panel and placeholder) -- modified at 4:34 Thursday 20th April, 2006
nesaraja wrote:
how to add the control into form..(Not in Panel and placeholder)
Get reference to the Form control, and add the dynamic control to the form. then i guess your next question will be "How do I get reference to the Form?" :-D. Ok, here are two ways: + With the ASP.NET 2.0, use the Page.Form[^] property. + With the ASP.NET 1.x, make sure the form tag has the
runat="server"
stuff, then you can declare the HtmlForm[^] instance in code-behind, and use it as you would with a normal object.