SqlDataSource with parameter
am 12.11.2007 20:11:11 von unknownI just want to select records with a certain date field > today's date:
SelectCommand="SELECT * FROM [Events] WHERE [Startdate] > ? "
OnSelected="src1_Selected">
---------------------
protected void srcEvents_Selected(object sender,
SqlDataSourceStatusEventArgs e)
{
e.Command.Parameters["Startdate"].Value = DateTime.Today;
}
-------------------
I have a list control bind to this data source but when executed the list
doesn't show. That means no record is selected. I know there are
qualifying records since I input them myself in SQL server.
Am newbie so I must code something wrong. Any insignt appreciated.