Home All Groups Group Topic Archive Search About

Dynamically show different web controls

Author
6 Jan 2006 2:20 AM
Seok Bee
Hi Experts,

I am trying to create a web form insert a record into Microsoft Access
database. In my web form I'll have a dropdown list. Let say my dropdown list
will have 4 available options (New User, Others, Network). When I chose "New
User" I want my form to show a group/list of controls different from the
option "Others" and "Network". Am I able to program the web form in this kind
of situation?
Please advise.

Many thanks in advance.

Rgds,
SB

Author
6 Jan 2006 8:24 AM
Bobby
Hello:
    You can make a panel in your page, and make this panel invisible.
You can add a subPanel in the invisible panel. So you add the controls
you want to dynamiclly show in the subPanel.
    At last, you can add the subPanel into the page in the Page_Load
function.
Author
12 Jan 2006 2:46 PM
Allan Ebdrup
"Bobby" <newcarcr***@gmail.com> wrote in message
news:1136535882.288237.263760@z14g2000cwz.googlegroups.com...
> Hello:
>    You can make a panel in your page, and make this panel invisible.
> You can add a subPanel in the invisible panel. So you add the controls
> you want to dynamiclly show in the subPanel.
>    At last, you can add the subPanel into the page in the Page_Load
> function.

Suppose you want to dynamically load many different controls fro an
everchanging collection. Is ther no way to do this truely dynamically as
discussed in my postings in the thread "Dynamically load webcontrol"?
Kind Regards,
Allan Ebdrup
Author
6 Jan 2006 5:19 PM
Phillip Williams
By using the Visible property of any control (including the Panel) you can
determine whether the control is rendered or not.  So if you have 3 panels on
the page you can set their Visible property to false and only change this
value to true for the panel that corresponds to the dropdownlist selection.
Show quoteHide quote
"Seok Bee" wrote:

> Hi Experts,
>
> I am trying to create a web form insert a record into Microsoft Access
> database. In my web form I'll have a dropdown list. Let say my dropdown list
> will have 4 available options (New User, Others, Network). When I chose "New
> User" I want my form to show a group/list of controls different from the
> option "Others" and "Network". Am I able to program the web form in this kind
> of situation?
> Please advise.
>
> Many thanks in advance.
>
> Rgds,
> SB