05 2014 档案

摘要:1 using System; 2 using System.Data; 3 using System.Configuration; 4 using System.Web; 5 using System.Web.Security; 6 using System.Web.UI; 7 using Sy... 阅读全文
posted @ 2014-05-23 09:36 应世玉 阅读(1140) 评论(0) 推荐(0) 编辑
摘要:1 public static string RandCode(int n) 2 { 3 char[] arrChar = new char[]{ 4 'a','b','d','c','e','f','g','h','i','j','k','l','m','n','p',... 阅读全文
posted @ 2014-05-23 09:33 应世玉 阅读(328) 评论(0) 推荐(0) 编辑
摘要:首先导入命名空间 using System.Web.UI.HtmlControls; 1 /// 2 /// 添加JS脚本链接 3 /// 4 /// 页面 5 /// 路径 6 public vo... 阅读全文
posted @ 2014-05-23 09:29 应世玉 阅读(310) 评论(0) 推荐(0) 编辑
摘要:1 照片1 2 照片2 3 上传 4 13 23 72 服务端ashx 1 if (context.Request.Files["filename1"] != null) 2 { 3 string fileName = Path.GetFile... 阅读全文
posted @ 2014-05-21 10:27 应世玉 阅读(1489) 评论(0) 推荐(1) 编辑
摘要:在非IE下,使用XMLHttpRequest 不能跨域访问,除非要访问的网页设置为允许跨域访问。将网页设置为允许跨域访问的方法如下:Response.AddHeader("Access-Control-Allow-Origin", "*");或指定域名下可以访问:Response.AddHeader... 阅读全文
posted @ 2014-05-21 10:14 应世玉 阅读(1118) 评论(0) 推荐(0) 编辑
摘要:前台HTML 1 2 3 4 Untitled Page 5 6 24 25 26 27 28 29 后台ashx1 context.Response.AddHeader("Access-Control-Allow-Origin", "*");//跨域必须有的头2 context.R... 阅读全文
posted @ 2014-05-21 10:11 应世玉 阅读(828) 评论(0) 推荐(0) 编辑
摘要:客户端 HTML 1 2 服务端 H.ashx 1 2 3 using System; 4 using System.Web; 5 6 public class H : IHttpHandler { 7 8 public void ProcessRequest (HttpC... 阅读全文
posted @ 2014-05-19 15:07 应世玉 阅读(292) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示