public ActionResult search(DateTime StartDate, DateTime enddate)
{
string EmpVisitor = @"Data Source=UTSIN-15;User ID=sa;Password=unified;Initial Catalog=EmpVisitor;MultipleActiveResultSets=True;Application Name=EntityFramework";
DataTable dtbl = new DataTable();
using (SqlConnection sqlcon = new SqlConnection(EmpVisitor))
{
sqlcon.Open();
SqlDataAdapter sqlda = new SqlDataAdapter("select * from dbo.visitordetails where Date Between '" + StartDate + "' And '" + enddate + "'", sqlcon);
sqlda.Fill(dtbl);
//return RedirectToAction("List");
}
return View(dtbl);
}
-------------------------------------------------------------------------
im getting the datatable empty

Nilesh ShahRank #42 · 34.2K reputationPosted Nov 2, 2017, 7:56 AM EDT
Nilesh ShahRank #42 · 34.2K reputationPosted Nov 1, 2017, 12:38 PM EDT
Lakshmikanth Chowdary51 reputationPosted Nov 2, 2017, 7:35 AM EDT
Lakshmikanth Chowdary51 reputationPosted Nov 2, 2017, 9:54 AM EDT