Link to home
Start Free TrialLog in
Avatar of timpoynter
timpoynter

asked on

ASP.NET filter a query based on checkboxes

HI
I am creating an ASP.net 2.0 app against an Oracle DB, I am relatively new to .net and oracle.
I have a view in oracle that I need to query however I want the end user to be able to select the values for two columns that are returned. So my view contains information for all usergroups and activities, I would like the end user to be able to select using check boxes the usergroups and activities that are included in the query. So lets say they want info Usergroups A, B and C and activities 1,2 and 3, they would tick the relevant CheckBoxes and this would add the where clause to the select on the view.

Thanks
Avatar of Kelvin McDaniel
Kelvin McDaniel
Flag of United States of America image

I'm not 100% sure of what you're actually asking for... it looks like either "how do I write this query", or, "what code I need to do this"...?

How exactly can I help you?
Avatar of timpoynter
timpoynter

ASKER

Hi

Thanks for the response and apologies for the confusion.
I have created a view in Oracle, I need to be able to perform a dynamic query against it based on some paramters that the end user selects via the asp page.  They will choose which values from two columns they wish to filter the results to. So if they were to tick the check boxes against Usergroups A, B and C and Activities 1,2 and 3 then I need to query the view as follows
Select * from View where Usergroups in ('A','B','C') and Activities in ('1','2','3')
I know how to query the view what I dont know is how to construct the page so provide the checkboxes and then the results.
Hope this is clearer?
Thanks
ASKER CERTIFIED SOLUTION
Avatar of timpoynter
timpoynter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial