Dynamically show different web controls

S

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
 
B

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

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

Allan Ebdrup

Bobby said:
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
 

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
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top