jQuery.POST - pass another parameter with Form.Serialize() - Asp.net MVC 3

后端 未结 3 2063
遇见更好的自我
遇见更好的自我 2021-02-10 11:16

As I am working on Asp.Net MVC Application, in my application I am using jQuery.POST method to submit a form.

e.g.

jQuery.post(\'/Product/Sa         


        
3条回答
  •  隐瞒了意图╮
    2021-02-10 11:54

    What about using the Url.Action method to build your calling URL? You can include the additional data you need that way.

    <%: Url.Action('Save', 'Product', new { "ProductID", your product id }) %>
    

    This would replace the hard-coded URL in your jQuery.post method call.

提交回复
热议问题