検索結果をフィルタリングするためのリンクを提供しようとしています。
<%= Html.ActionLink("Filter Results", "Index", new { page = Model.RestaurantList.PageIndex(), searchText = Model.SearchText, useFilter = true, filterOption = Model.FilterOption, filterText = Model.FilterText }, null)%>
コントローラの定義はそれ自体です
public ActionResult Index(int? page, string searchText, bool useFilter, string filterText, string filterOption)
ただし、これをデバッグすると、useFilter変数であっても、値が正しく設定されません。
私のリンクはlocalhost/home / index / true?page=0にレンダリングされます
これを修正する方法はありますか?