Control modifications and AutoPostBack

P

Pete Davis

First of all, I'm more or less a novice at web stuff, not just ASP.NET but
JavaScript and VBScript as well.

I've got a page for doing reservations for a hotel. They want to do two
things that are causing a problem:

1: Ability to book multiple rooms
2: The ability to modify the number of children in each room (from 1-3
children) and be able to set the age of each child.

The number of rooms (between 1 and 3) is chosen from a combo box. If more
than 1 is selected, controls that are invisible are made visible for the
additional rooms. My question is: Is there a way to do this without setting
the combo box to AutoPostBack?

The children issue is the same. There are age combos for each child.
Normally all age combos are disabled. When you change the number of
children, the appropriate number of age combos go from Enabled=false to
Enabled=true. Again, any way to do this without AutoPostBack?

It's not a huge deal, but it's annoying the guy who I'm doing it for and I'd
like to find a way around it if it's not too difficult. If it's a major
pain, I may not do it.

Thanks.

Pete
 
E

|{evin

First of all, I'm more or less a novice at web stuff, not just ASP.NET but
JavaScript and VBScript as well.

I've got a page for doing reservations for a hotel. They want to do two
things that are causing a problem:

1: Ability to book multiple rooms
2: The ability to modify the number of children in each room (from 1-3
children) and be able to set the age of each child.

The number of rooms (between 1 and 3) is chosen from a combo box. If more
than 1 is selected, controls that are invisible are made visible for the
additional rooms. My question is: Is there a way to do this without setting
the combo box to AutoPostBack?

The children issue is the same. There are age combos for each child.
Normally all age combos are disabled. When you change the number of
children, the appropriate number of age combos go from Enabled=false to
Enabled=true. Again, any way to do this without AutoPostBack?

It's not a huge deal, but it's annoying the guy who I'm doing it for and I'd
like to find a way around it if it's not too difficult. If it's a major
pain, I may not do it.

Thanks.

Pete

You can use javascript and style to change the visibility and state.
On your controls, set autopostback=false, and hook the (click, select,
etc) event to the javascript.
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top