I have 2 dropdownlist boxes on my page for starters with a gridview.
The 2 dropdowns are bound to the database.
I have said appendBoundItems = true on both of them
added another <asp:listitem text="-All-" value=" "></listitem> to each of them before they bound.
I set the search button to post back to the same page.
The select statement that i used was as follows
Expand|Select|Wrap|Line Numbers
- select companyID,companyname,country,province,city,industry,companyclassification from [company] WHERE (([country] = CASE WHEN @country IS NOT NULL THEN @country ELSE [country] END) AND ([province] = CASE WHEN @province IS NOT NULL THEN @province ELSE [province] END))
Now it only returns when i have made both selections. If i only make one selection then it does not work.
I have done this previously but cant seem to figure out what i am missing.
Please help