摘要: <%@ WebHandler Language="C#" Class="ValidateCode" %>using System;using System.Web;using System.Drawing;using System.Web.SessionState;public class ValidateCode : IHttpHandler,IRequiresSessionState { public void ProcessRequest(HttpContext context) { context.Response.ContentTy 阅读全文
posted @ 2013-01-15 14:46 南潇湘 阅读(321) 评论(0) 推荐(0) 编辑
摘要: List<Photo> photos=new List<Photo>(); string json = ser.Serialize(photos); return json;在ajaxList.ashx中获得后台数据,以Json格式返回给前台。//时间格式转换 function ChangeDateFormat(cellval) { var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10 阅读全文
posted @ 2013-01-15 14:44 南潇湘 阅读(735) 评论(0) 推荐(0) 编辑
摘要: 页面的下载应用<ahref="HandlerDownLoad.ashx?file=07.jpg">下载</a>HandlerDownLoad.ashx代码public class HandlerDownLoad : IHttpHandler { public void ProcessRequest (HttpContext context) { string fileName = context.Request.QueryString["file"]; context.Response.AddHeader("Conten 阅读全文
posted @ 2013-01-15 14:32 南潇湘 阅读(798) 评论(0) 推荐(0) 编辑