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...
阅读全文
摘要: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',...
阅读全文
摘要:首先导入命名空间 using System.Web.UI.HtmlControls; 1 /// 2 /// 添加JS脚本链接 3 /// 4 /// 页面 5 /// 路径 6 public vo...
阅读全文
摘要:1 照片1 2 照片2 3 上传 4 13 23 72 服务端ashx 1 if (context.Request.Files["filename1"] != null) 2 { 3 string fileName = Path.GetFile...
阅读全文
摘要:在非IE下,使用XMLHttpRequest 不能跨域访问,除非要访问的网页设置为允许跨域访问。将网页设置为允许跨域访问的方法如下:Response.AddHeader("Access-Control-Allow-Origin", "*");或指定域名下可以访问:Response.AddHeader...
阅读全文
摘要:前台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...
阅读全文
摘要:客户端 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...
阅读全文