<httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpModules>
ScriptMethod(ResponseFormat = ResponseFormat.Json)]
[WebMethod]
/// <summary>
/// 是否允许注册
/// </summary>
/// <param name="MemberLoginID"></param>
/// <returns></returns>
public static MemberInfo AllowRegist(string MemberLoginID)
{
return new MemberInfo();//由于设置了返回类型是JSON,所以客户端的JQ能够识别
// MemberInfoBLL mi = new MemberInfoBLL();
//if (!mi.ExistMember(MemberLoginID))
//return "{d:true}";//我测试发现,客户段在接收数据的时候,会多了2个双引号,导致转换JSON格式失败..郁闷
//else
//return "{d:false}";
}
$.ajax({
cache:false,
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: "{'MemberLoginID':'" + $("#<%=MemberLoginID.ClientID %>").val() + "'}",
dataType: 'json',
url: 'Reg.aspx/getDate',
success: function(result,x,y) {
alert(result);
},
beforeSend:function (xhr) {
xhr.setRequestHeader('If-Modified-Since', '0');
//this; // 调用本次AJAX请求时传递的options参数
},
error: function(e) {
debugger; //alert("可能服务器忙没有返回数据,请重试");
}
});
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有