ASP.net example needed - loading a DropDownList based on value selected on another DDL

  • Thread starter Thread starter Keith-Earl
  • Start date Start date
K

Keith-Earl

Please direct me to an example of loading a DDL based on user input in a
text box or another DDL.

For example, Florida has 67 counties and six regions. Initially we want all
67 counties to be loaded in the COUNTY DDL. If a user selects NORTHWEST
from the REGION DDL we want to subset the COUNTY DDL to only contain the
counties for that REGION, 12 to be specific.

Can this be done in ASP.NET without many round trips? We currently
implement this feature in Classic ASP using Remote Scripting. While RS is
making a round trip to the database, the user has no idea what is going on.
If we have to make the page blink that will be okay but not preferred.

Thanks,

Keith
 
you can do it setting autopostback=true for the ddl. unlike when you do this
with RS, its a standard async post, so the user can change the value in the
drop down before the postback completes (try the down arrow on the ddl), so
client script must be added to prevent this.

I'd use all client code and skip the roundtrip altogether.


-- bruce (sqlwork.com)
 
Back
Top