VB Visual Studio How to filter a gridview as >= Current Date
Posted on 2009-07-10
Hello all. I am very new to ASP.NET, as I am migrating all of my Classic ASP sites to .NET now.
I have a basic gridview that searches all of its records by "state" from a dropdown control. That works perfectly. I would like to take it one step further by altering my WHERE clause to be by "state" AND ">=CurrentDate".
When I click to "configure my datasource" to alter the query, I am not sure of the syntax for the current date.
The WHERE currently is "=" to a "Control" named "DropDownList1". I supposed I just add another WHERE to that, but I'm not sure how. I choosed the db field against which I'd like to query. Then I select ">=" from the next list. Then I select "none" from the 3rd list. That prompts me for a parameter, which I assume is where the "CurrentDate" would be, but I'm not sure of the syntax.
Your help is always appreciated.
Thanks so much,