Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Creating webcontrols on the fly

Reply
Thread Tools

Creating webcontrols on the fly

 
 
Fabiano
Guest
Posts: n/a
 
      04-30-2004
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


 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      04-30-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Scott Mitchell [MVP]
Guest
Posts: n/a
 
      05-01-2004
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.velocityreviews.com/forums/(E-Mail Removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
“test what you fly and fly what you test” Lawrence D'Oliveiro NZ Computing 0 06-05-2009 02:06 AM
THE FLY & THE FLY II teem DVD Video 0 12-10-2005 09:31 PM
Fly outmenu on the fly Brian Javascript 0 04-08-2005 01:34 AM
To Fly or not to fly? Should I move from Mozilla 1.5 to T-bird andF-bird? Daniel Steinberg Firefox 7 11-06-2003 11:31 AM
To Fly or not to fly? Should I move from Mozilla 1.5 to T-bird andF-bird? Daniel Steinberg Firefox 5 11-05-2003 06:23 AM



Advertisments