Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to realize multi-selection of drop-down menu in ASP?
How to realize multi-selection of drop-down menu in ASP?
Yes, you can. For example, if you make a type, including A, B and C, the form can do this:

& ltselect name = model & gt

& ltoption value = " A " & gtA & lt/option & gt;

& ltoption value = " B " & gtB& lt; /option & gt;

& ltoption value = " C " & gtC & lt/option & gt;

& lt option value = "_"> All

& lt/select & gt;

Then use it when judging in the database.

Select * from user where user _ modellike "%"+rtrim (@ model)+"%"

If @model is a, records with model a will be listed; if @model is _, all records will be listed.

If your form is dynamic, you can generate an option through asp loop, and the "All" option can be placed outside the loop.