adding controls to div programmatically

Discussion in 'ASP .Net Web Controls' started by de, Jan 8, 2005.

  1. de

    de Guest

    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?
     
    de, Jan 8, 2005
    #1
    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.