I change my code for searching as -
[HttpPost]
public ActionResult Index(FormCollection oFormCollection, int? page)
{
var pageNumber = page ?? 1;
var pagesize = 5;
var inventoryProducts = from inventoryProd in AddProducts() select inventoryProd;
string sectionName = oFormCollection["sectionName"];
string sectionCode = oFormCollection["sectionCode"];
string size = oFormCollection["size"].ToString();
var searchedResult = (from e in inventoryProducts
where e.SectionName == sectionName.ToUpper().Trim()
|| e.SectionCode == sectionCode.ToUpper().Trim()
|| e.Size.ToString() == size.Trim()
select e).ToList();
ViewBag.SectionName = sectionName;
ViewBag.SectionCode = sectionCode;
ViewBag.Size = size;
ViewBag.ProductList = searchedResult.ToPagedList(pageNumber, pagesize);
return View();
}
and it gives me appropriate values as I want.