Click here to Skip to main content
15,917,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make one button do many tasks

i make a search form that have many things that user can use to search

one of these things is search by gender and other is search by SSN

i make a search button for all

so i want to know how to make that but search according what the user had choose
Posted
Comments
KaushalJB 27-May-14 4:58am    
Please post some code that you have tried for your search button
johannesnestler 27-May-14 9:06am    
So your problem isn't related to "button" or tasks (=very good question title), but just how to get some user selections (options) and transform that to a "search"? You didn't show any code...

The obvious answer is, add some code to your event handler. However, since we don't know what user choices are available it is difficult to make any sensible suggestions. Perhaps you should show a dialog which allows the user to select filters, locations, keywords, regexes etc.
 
Share this answer
 
In button click eventhandler of "search" button, you have to write code to check, in which controls user has provided inputs and then pass all those inputs to stored procedure where you have written query to search with inputs... You can also use Dynamic Query in stored procedure but for using it but you have to validate your inputs properly as sql injection chances are more in case of dynamic query..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900