I use this code for advance search
public ActionResult AdvanceSearch(string HeadTitle, string fulltext, string firstdate, string enddate, string newstype)
{
var q = db.Tbl_News.Where(n => n.HeadTitle.Contains(HeadTitle) && n.FullText.Contains(fulltext) && n.Date >= firstdate && n.Date <= enddate);
return PartialView("AdvanceSearch", q);
}
this code work for Search in HeadTitle and full text but when I add date show me an error .
How use this code for search between two dates ?
DateTime(notstring)