摘要: <input type="button" name="back" value="返回上一页" onclick="javascript:history.back(-1);"/>history.back(-1):直接返回当前页的上一页,数据全部消息,是个新页面history.go(-1):也是返回当前页 阅读全文
posted @ 2019-04-28 13:58 御风飞舞 阅读(790) 评论(0) 推荐(0) 编辑
摘要: C#字符串替换小括号(需转义小括号) 或者写正则表达式时需要转义小括号。 例如: string[] strs = Regex.Split(str, "\(base 16\)"); "<span>\(.*?\)</span>"; 这时代码在c#中会提示:无法识别的转义序列 也就是说单斜杠无法转义小括号 阅读全文
posted @ 2018-10-17 17:48 御风飞舞 阅读(2732) 评论(0) 推荐(0) 编辑
摘要: 一般方法C#解析json: 如处理: 此类json数组。 1.下载Newtonsoft.Json,在项目中引入。 在项目中加入 using Newtonsoft.Json; 2.根据要处理的json字符串创建C#类。这里也可以通过其他转换工具,把json字符串直接生成C#类 PS:需要处理的json 阅读全文
posted @ 2018-08-07 16:35 御风飞舞 阅读(4857) 评论(0) 推荐(0) 编辑
摘要: 1.Click事件——EventArgs强转MouseEventArgs 2.通过MouseDown委托 阅读全文
posted @ 2018-06-06 16:03 御风飞舞 阅读(5131) 评论(0) 推荐(2) 编辑
摘要: 1.byte[] 转换hex(16进制字符串) 1.1 BitConverter方式 1.2 StringBuilder方式 2.hex(16进制字符串)转换 byte[] 转自: jamesbing http://gaobing.cnblogs.com 阅读全文
posted @ 2018-04-24 10:12 御风飞舞 阅读(8466) 评论(0) 推荐(0) 编辑
摘要: public static List<Cookie> GetAllCookies(CookieContainer cc) { List<Cookie> lstCookies = new List<Cookie>(); Hashtable table = (Hashtable)cc.GetType() 阅读全文
posted @ 2018-02-22 14:12 御风飞舞 阅读(2389) 评论(0) 推荐(0) 编辑
摘要: public static string ToGB2312(string str) { string r = ""; MatchCollection mc = Regex.Matches(str, @"\\u([\w]{2})([\w]{2})", RegexOptions.Compiled | R 阅读全文
posted @ 2018-02-02 11:06 御风飞舞 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 文件上传到服务器上 Fileupload控件:只是用来选择 需要一个按钮提交 前台代码: 后台代码: Web.config 代码: 问题1:如何保留原有名称? 问题2:重名问题如何解决? ; 问题3:如何限制选择文件的类型? 前台代码 问题4:大文件问题 程序默认允许的上传文件大小为 4MB 一、扩 阅读全文
posted @ 2017-10-09 01:45 御风飞舞 阅读(8572) 评论(0) 推荐(0) 编辑
摘要: 进程 进程类似于整个公司 - 一个进程 - 一个程序 Process.Start(""); 线程 默认程序中只有一个线程 - 打个比方,线程就相当于整个公司的公司老板 同一时间只能做一件事 主线程 - 老板 线程 - 公司中的员工,临时工 1、启用线程 引用命名空间:using System.Thr 阅读全文
posted @ 2017-10-09 01:35 御风飞舞 阅读(176) 评论(0) 推荐(0) 编辑
摘要: //窗体移动API[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport("user32.dll")]public static extern bool SendMessage(IntPtr hwn 阅读全文
posted @ 2017-10-09 01:26 御风飞舞 阅读(447) 评论(0) 推荐(0) 编辑