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. Advertising

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

    roughly

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "Fabiano" <> wrote in message
    news:...
    > 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
    >
    >
     
    Alvin Bruney [MVP], Apr 30, 2004
    #2
    1. Advertising

  3. Fabiano wrote:
    > 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?


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Murtix Van Basten

    creating on-the-fly asp:table in the code file

    Murtix Van Basten, Jun 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    6,508
    Murtix Van Basten
    Jun 25, 2003
  2. LIN

    creating ASPx Pages on the FLY

    LIN, Aug 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    408
  3. Maziar Aflatoun

    Creating a downloadable file on the fly

    Maziar Aflatoun, Dec 22, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    462
    JDModev
    May 10, 2004
  4. Arne

    Compiling Webcontrols on the fly

    Arne, Jan 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    122
  5. Brian

    Fly outmenu on the fly

    Brian, Apr 8, 2005, in forum: Javascript
    Replies:
    0
    Views:
    118
    Brian
    Apr 8, 2005
Loading...

Share This Page