adding controls to div programmatically

D

de

I'm trying to create a composite control w/o knowing much about it. I
should probably get a book and start at chapter 1 but in the hopes of
saving time, I'm posting. Do the control books ever use javascript,
anyway?

I'm inheriting from webcontrol and have added a textbox, a listbox, a
requiredFieldValidator, and a HtmlGenericControl (div). I want to show
and hide the listbox via javascript. I've add appropriate attributes to
my controls so that the javascripts should be called. I want to put
the listbox (lb) in the div (div)programmatically but don't know how. I
tried div.Controls.Add(lb). Any help?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top