次の構文でjQueryを使用してHTML.Formを投稿すると:
$.post('<%: Url.Action("ActionName","ControllerName") %>',
$("#FormName").serialize());
オブジェクトはサーバーに正しく投稿されますが、次を使用すると:
var reason = encodeURIComponent($("#FormName").serialize());
$.post('<%: Url.Action("ActionName","ControllerName") %>',
{ reason: reason });
シリアル化されたオブジェクトは null です。encodeURIComponent を使用しても使用しなくても、同じ結果が得られます。より多くのパラメーター データをサーバーに送信する必要があるため、2 番目の方法を使用したいのですが、シリアル化されたオブジェクトを正しく送信することができません。