I am doing a custom search based on keywords, location and category. I have built the linq query in the code behind fine. I now want to bind it to a listview but also enable paging on the listview.
How is this done? What event do i use, or is it all done from code behind?
var searchQuery = from s in db.RecruitmentJobs
where s.job_end_date >= DateTime.Now
if (keywords != "")
searchQuery = searchQuery.Where(s => s.job_title.Contains(keywords));
if (location != "")
searchQuery = searchQuery.Where(s => s.job_location.Contains(location));
if (category > 0)
searchQuery = searchQuery.Where(s => s.job_categoryID.Contains("¬" + category + "¬"));