摘要:
<%@ 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 阅读全文
摘要:
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 阅读全文
摘要:
页面的下载应用<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 阅读全文