i want to search record using dropdown and text box
the data type is DateTime
in date column its saving as 28/11/2012 12:45:08 full date and time
i am using this code its not working on client systems . its only working on server
urgent please rply
protected void Button2_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions WHERE report_type = @report_type AND " + "[R_date] >= @date_t_s and [R_date] < @date_t_e");
cmd.Connection = con;
cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
cmd.Parameters.Add("@date_t_s", SqlDbType.DateTime).Value = DateTime.Parse(TextBox1.Text);
cmd.Parameters.Add("@date_t_e", SqlDbType.DateTime).Value = DateTime.Parse(TextBox1.Text).AddDays(1);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}