http://yisean.iteye.com/blog/542687
用的泛型?
简单的三层吗?
嗯嗯,简单的三层架构,用到EXTJS控件
ai......看看我自己做的
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string id = context.Request.QueryString["picid"]; if (string.IsNullOrEmpty(id)) { System.IO.FileStream fs = new System.IO.FileStream(System.Web.HttpContext.Current.Server.MapPath("../../icon/20111130160358207106.png"), System.IO.FileMode.Open, System.IO.FileAccess.Read); byte[] image = new byte[fs.Length]; fs.Read(image, 0, image.Length); context.Response.ContentType = "png";//设定输出文件类型 context.Response.OutputStream.Write(image, 0, image.Length); context.Response.End(); return; } HDQY.HDQYMS.Business.MsHrms.Hrms_worker_zhengzhaoBLL bll = new HDQY.HDQYMS.Business.MsHrms.Hrms_worker_zhengzhaoBLL(); HDQY.HDQYMS.Entity.HrmsWorkerZhengzhao zhengzhao = bll.GetHrmsWorkerZhengzhaoByID(id); if (zhengzhao != null && zhengzhao.Photo != null && zhengzhao.Photo.Length != 0) { context.Response.ContentType = zhengzhao.PhotoType;//设定输出文件类型 context.Response.OutputStream.Write(zhengzhao.Photo, 0, zhengzhao.Photo.Length); context.Response.End(); } else { System.IO.FileStream fs = new System.IO.FileStream(System.Web.HttpContext.Current.Server.MapPath("../../icon/20111130160358207106.png"), System.IO.FileMode.Open, System.IO.FileAccess.Read); byte[] image = new byte[fs.Length]; fs.Read(image, 0, image.Length); context.Response.ContentType = "png";//设定输出文件类型 context.Response.OutputStream.Write(image, 0, image.Length); context.Response.End(); } }
前台只要向这个页面要数据就行了