由於我在處理Asp.Net MVC應用程序,在我的應用程序中,我使用的是jQuery.POST
方法來提交表單。jQuery.POST - 通過Form.Serialize()傳遞另一個參數 - Asp.net MVC 3
例如
jQuery.post('/Product/Save', jQuery(document.forms[0]).serialize(),
function (data) { alert('Product Added Successfully.); }
);
在上面的代碼片段,我想通過另一個參數..讓我們說.. ProductID
。
所以,這個想法是,我想通過在jQuery.POST method
都jQuery(document.forms[0]).serialize()
和,所以我可以在我的controller's action method
同時獲得Form and ProductID
。
有沒有人請讓我知道我會這樣做?
在此先感謝。