当用户单击该按钮时,我需要将以下TextField的值提交给位于/TestService/SaveMethod
的Webservice。如何获取文本字段值并通过webservice发送该值
<div class="content">
@Html.TextBoxFor(mo => mo.id, new { id = "id" })
<input type="text" id="fname" name="fname" />
<input type="submit" value="send" class="save"/>
</div>
的jQuery:
$(function() {
$('.save').click(function() { // How to grab the values of those textfields and send it over the webservice located at `/TestService/SaveMethod` });
});
好吧,那么如果操作成功或失败,我将如何获得服务器响应? – 2013-02-26 09:25:51
您可以根据您得到的回应显示回复,我的意思是标题信息。但是,留下那个,然后去ajax。 – gaurav 2013-02-26 09:29:43