Creating webcontrols on the fly

Discussion in 'ASP .Net Web Controls' started by Fabiano, Apr 30, 2004.

  1. Fabiano

    Fabiano Guest

    Please,

    I need to create an webpage that when user clicks on ADD button it's create
    a new line with dropdownlist, textboxes and on.
    with ASP and HTML i use DHTML to create another controls. Now with ASP.NET
    and C# how can i do this. May i use DHTML or can i do this on my codebehind?

    Tks in adv.

    Fabiano
     
    Fabiano, Apr 30, 2004
    #1
    1. Advertisements

  2. codebehind will work
    dropdownlist d = new dropdownlist();
    Form1.controls.add(d);

    roughly
     
    Alvin Bruney [MVP], Apr 30, 2004
    #2
    1. Advertisements

  3. Fabiano, check out:

    Dynamic Controls in ASP.NET
    http://aspnet.4guysfromrolla.com/articles/081402-1.aspx

    And:

    Working with Dynamically Created Controls
    http://aspnet.4guysfromrolla.com/articles/082102-1.aspx

    Happy Programming!

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com
    http://www.ASPFAQs.com
    http://www.ASPMessageboard.com

    * When you think ASP, think 4GuysFromRolla.com!
     
    Scott Mitchell [MVP], May 1, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.