完整的 dataType=text/plain jquery ajax 登录验证
2014-09-25 09:29
330 查看
Html:
Ashx
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Security; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Sales.Web.url { /// <summary> /// LoginHandler 的摘要说明 /// </summary> public class LoginHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; try { if (HttpUtility.UrlDecode(context.Request["name"] ?? "") == "用户名" && (context.Request["password"] ?? "").ToLower() == FormsAuthentication.HashPasswordForStoringInConfigFile("123456", "MD5").ToLower()) { context.Response.Write("true"); } else { context.Response.Write("false"); } } catch (Exception ex) { context.Response.Write(ex.Message); } finally { context.Response.End(); } } public bool IsReusable { get { return false; } } } }
Ashx
相关文章推荐
- Jquery发送ajax请求以及datatype参数为text/JSON方式
- jquery中ajax的dataType设置为html和text的区别。
- Struts学习_Jquery发送ajax请求以及datatype参数为text/JSON方式
- Jquery发送ajax请求以及datatype参数为text/JSON方式
- S2SH整合JQuery+Ajax实现登录验证功能
- jquery中ajax的dataType属性介绍
- JQuery遮罩层登录界面实现(AJAX实现登录验证,源码下载)
- jquery 的ajax请求 之都是 dataType 缺失惹的祸
- $.ajax()方法dataType="text"返回数据乱码问题
- jquery中ajax的dataType属性包括哪几项
- JQuery+Ajax实现登录验证
- JQuery遮罩层登录界面实现(AJAX+ASP.NET实现登录验证,源码下载)
- jquery中ajax的dataType属性包括哪几项
- jQuery的ajax实现登录验证
- jQuery+AJAX实现遮罩层登录验证界面(附源码)
- Jquery.ajax中dataType不可少
- jquery 的 ajax的dataType,服务器返回了数据,但是succes:function(data)不执行
- ASP.NET基于JQUERY的AJAX的验证登录(JSON)