I want to know that what should be the datatype of Controller Action Paramter’s for JSon post value?
I’m posting the form using jQuery.Post method…
E.g.
jQuery.post('/Customer/PostData', jQuery(document.forms[0]).serialize(), function (data) {
alert('Successfully post..!');
});
I want to add another parameter with post data.. let’s say I also want to post CustomerID along with form data JSON..
Could you please let me know what should I keep my controller paramter’s datatype? I tried with List<string,string> as a controller’s paramter data type , but it is not working.
Thanks in advance..
You could add a hidden field to your form containing the value you would like to send:
and then: