• Sean Lange (1/31/2013)


    The code in the click event of the 'Find' button seems to be okay to display the filtered values but it still doesnt work. Please find the code attached.

    What do you mean it doesn't work? Does it display the wrong data? Too much? Not enough? I don't see anything horribly wrong with your code. You should look at disposing your objects though so you don't have lots of work for GC to handle.

    Thanks Sean. Sorry for the incomplete info. Actually my requirement is to stick the results to a gridview based on the values the users select from the 2 dropdown boxes and after they press the 'Find' button.

    However, when I view the result in a browser, it displays all the data from the table in the gridview and doesnt filter out based on the values from the 2 dropdown boxes. I think somewhere there is a link missing between the click event code of the button and the gridview. Because when I run the query in SQL, it works correctly and displays filtered data.