Dropdownlist and client side




I want to filter records that display in some asp.net dropdownlists without
causing a postback. Any ideas?

e.g. when the selectedindexchange event fires for dropdownlist1 then only
certain records are displayed in dropdownlist 2. I know how to add a client
side javascript event to the dropdownlist but I dont know how to..

1: Filter out records in dropdownlist2 without a postback
2: Whats the best way to handle the data that is returned from the database
that is used as the source for the dropdownlists. e.g. Return a dataset,
store into a session variable and write javascript to populate an array? I'd
need 2 arrays, one for each dropdownlist...

Any code examples or previous experience most welcomed.


Rob T

You'll most likely have to use javascript. I don't have any samples, but
hp.com use to have something like that on their support site. when you
enter in a model number, the dropdowns would change to only show the proper
product results.. I'm not sure if they still do it that way or not........

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