2010-05-10 34 views
0

我怎麼能有ajaxoptions:如何添加ajaxoptions形成包括以下形式

<form id="" action="<%=Url.Action("ChangePassword",new{Action="ChangePassword" }) %>" method="post" enctype="multipart/form-data"> 

+0

您將發佈與Ajax調用您的形式和你問該怎麼辦呢? – anilca 2010-05-10 10:31:43

+0

我想動態更新部分視圖。 – learning 2010-05-10 10:43:33

回答

0

什麼的JavaScript(如果有的話)庫您使用?

通常您在腳本中設置選項而不是C#代碼。

爲了回答您的評論:

jQuery的W/Form Plugin像:

var options = { 
     target: '#output2' // target element(s) to be updated with server response 
} 

$(function() { 
    $("form").submit(function() { 

     $(this).ajaxSubmit(options); 

     return false; 
    }); 
}); 
+0

我可以舉個例子怎麼做? – learning 2010-05-10 10:28:55

+0

...再看看答案。 – 2010-05-10 10:35:01