ASP.NET WebForms & jQuery Validate's remote method
问题 Can anyone please tell me how I can get an ASP.NET WebMethod to return correctly-formatted data for display by jQuery Validate? Here's my code: Client-side code $('#txtUName').rules('add', { remote: { type: 'POST', url: 'Register.aspx/ValidateUserNameOrEmail', contentType: 'application/json; charset=utf-8', data: JSON.stringify({ 'data' : $('#txtUName').val(), 'valUser' : true }), dataFilter: function(result) { return $.parseJSON(result).d; }, dataType: 'json' } }); Server-side code