比如我http://localhost:1338/category/category1?view=list&min-price=0&max-price=100
頁如何獲得鑑於當前路由的URL參數值在ASP .NET MVC
上在我看來,我要呈現某種形式的
@using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { /*this is poblem place*/ } }, FormMethod.Get))
{
<!--Render some controls-->
<input type="submit" value="OK" />
}
我想要什麼是從當前頁面鏈接獲取view
參數值,用它來構造表單獲取請求。我試過@using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { "view", ViewContext.RouteData.Values["view"] } }, FormMethod.Get))
但它沒有幫助。
非常感謝。這正是我所鎖定的。 – Dmytro