سلام دوستان
با توجه به عکس ، بعد از اینکه سرچ رو انجام میدم Input ها خالی میشه. و کاربر نمیدونه که چی رو سرچ کرده . چطور میتونم مواردی که سرچ کرده رو بعد از زدن دکمه جستجو دوباره توی Input ها نمایش بدم ؟

SearchMVC1.jpg

این کدهای مربوط به Index هست :


<form method="get" action="/people/index">
<tr>


<th>
<input type="text" class="form-control" name="search" " />
</th>
<th>
<input type="text" class="form-control" name="search1" />
</th>
<th>
<input type="text" class="form-control" name="search2" />
</th>
<th>

<input type="submit" value="جستجو" class="btn btn-success btn-block" />
</th>
</tr>
</form>


اینم کدهای مربوط به کنترلر :


public ActionResult Index(string search,string search1,string search2)
{
if (!string.IsNullOrEmpty(search) || !string.IsNullOrEmpty(search1)|| !string.IsNullOrEmpty(search2))
{
return View(db.People.Where(c =>c.PersonCode.Contains(search) && c.PersonName.Contains(search1) && c.PersonFamily.Contains(search2)));
}
return View(db.People.ToList());
}