我刚刚将搜索框添加到了索引视图
<form asp-action="Index" asp-route-account="@Model.First().AccountId" method="get">
<div class="form-actions ">
<p>
<input id="searchStringId" type="text" name="searchString" value="@ViewData["currentFilter"]" />
<input type="submit" value="Search" class="btn btn-primary">
<a asp-action="Index" asp-route-account="@Model.First().AccountId">Back to Full List</a>
</p>
</div>
</form>
这给了我: https:// localhost:44377 / MainUsers / Funds?searchString = aldi
但是我需要 https:// localhost:44377 / MainUsers / Funds?account = 1 && searchString = aldi换句话说,我需要搜索字符串还包括路由ID。 有什么想法吗?