在asp.net MVC3中,我如何使用源網頁的查詢參數來實現輸入GET功能?我寧願不使用隱藏的輸入。ASP.NET MVC3輸入使用查詢參數獲取GET
更新。例如,我的頁面包含查詢參數id = 54,當輸入導致GET時,我需要目標控制器/操作接收此查詢參數。
// could i change it for include query parameters of source page?
using (Html.BeginForm("Action", "Controller", FormMethod.Get))
{
<input type="submit" value="Text" onclick="submit"/>
}
請重新表述的問題,我不明白。在ASP.NET MVC 3中發佈表單時,您希望實現隱藏輸入的替代方案嗎? – Rhapsody 2012-02-01 13:50:03
這似乎不可能:http://stackoverflow.com/questions/1116019/submitting-a-get-form-with-query-string-params-and-hidden-params-disappear 有人可以確認嗎? – fravelgue 2012-02-01 16:21:37