我有以下内容:
@Html.ActionLink("Customer Number", "Search", new { Search = ViewBag.Search, q = ViewBag.q, sortOrder = ViewBag.CustomerNoSortParm, })
两个 viewbag 属性都来自 URL:
http://localhost:51488/Home/Search?Search=Postcode&q=test&sortOrder=CustomerNo
但是生成的 URL 是:
http://localhost:51488/Home/Search?sortOrder=CustomerNo
它没有拾取任何一个 ViewBag 值。