我有以下表格
@H_403_2@<form name="SearchForm" method="post" id="SearchForm" action="/Search/">
以下按钮
@H_403_2@<input type="button" onclick="javascript:document.SearchForm.submit();" class="btn-leftsearch"> @H_403_2@[HttpPost] public ActionResult Index(string querystring) { return View(); }当然,querystring为null.我想将查询字符串或最好是表示表单中字段的其他内容传递给控制器.我尝试过使用表单标记中的action属性.我试图将数据添加到按钮中的onclick方法.什么都行不通.我想做的就是传递一些这样的数据
@H_403_2@Search?pri=all&amenity=pool etc在控制器中我会有类似的东西
@H_403_2@[HttpPost] public ActionResult Index(string pri,List<string> amenities) { ... }有人能告诉我如何将这些数据传递给视图吗?