Dropdown list with a "Select All" option
Posted
by shawnboy
on Stack Overflow
See other posts from Stack Overflow
or by shawnboy
Published on 2010-04-30T18:35:24Z
Indexed on
2010/04/30
18:37 UTC
Read the original article
Hit count: 186
I have three dropdown boxes, Region, District, and City. I want my District dropdown to have a "Select All" option so the user can get all Cities in the Region, else just display the City based on the selected District. My query looks like this: IF @district =-2 THEN (SELECT DISTINCT city FROM myTable WHERE RIGHT(Region, 3) = ?) ORDER BY city) ELSE (select DISTINCT city FROM myTable WHERE District = ?) Order by city I'm using vb.net/sql I couldn't find any complex case scenarios in my search either. Any sugguestions would be appreciated!
© Stack Overflow or respective owner