摘要: C#获取文件夹下的所有文件的文件名 拷贝文件夹的所有内容到另一个文件夹内 删除文件夹 阅读全文
posted @ 2016-05-23 16:55 苍 阅读(457) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net.Mail; using System.Net.Mime; using System.Net; using System.IO; ... 阅读全文
posted @ 2016-05-23 16:52 苍 阅读(584) 评论(0) 推荐(0) 编辑
摘要: Token主要为了防止非本页数据的提交,防止重复提交。 调用: 阅读全文
posted @ 2016-05-17 16:32 苍 阅读(8872) 评论(0) 推荐(0) 编辑
摘要: var password = document.getElementById('password').value; var regPassword = "^(?!^[0-9]+$)(?!^[a-zA-Z]+$)[0-9a-zA-Z_]{6,16}$"; var passwordFalg = password.search(regPassword); if (passwordFalg == -1)... 阅读全文
posted @ 2016-05-16 15:48 苍 阅读(692) 评论(0) 推荐(0) 编辑
摘要: 可以自行查出想要的字段,并且返回的是model类型,可以点出所有的字段。 但是select 后面的字段名 必须有xml的字段名一模一样。 阅读全文
posted @ 2016-05-04 22:40 苍 阅读(470) 评论(0) 推荐(0) 编辑
摘要: MVC方式: 显示提示框,并返回上一页 return Content("<script>alert('暂时没有实践作业!');history.go(-1);</script>"); Redirect("/控制器/视图?参数"); return Redirect("/Home/Index?id=" + 阅读全文
posted @ 2016-04-24 19:56 苍 阅读(4331) 评论(0) 推荐(0) 编辑
摘要: string pat = "你好么123"; string str = Regex.Replace(pat, @"[^\d.\d]", ""); int result = 0; if (Regex.IsMatch(str, @"^[+-]?\d*[.]?\d*$")) { result = Convert.ToInt32(str); }//结果:result=123; 阅读全文
posted @ 2016-04-19 19:00 苍 阅读(352) 评论(0) 推荐(0) 编辑
摘要: Web领域的实时推送技术,也被称作Realtime技术。这种技术要达到的目的是让用户不需要刷新浏览器就可以获得实时更新。它有着广泛的应用场景,比如在线聊天室、在线客服系统、评论系统、WebIM等。 谈到Web实时推送,就不得不说WebSocket。在WebSocket出现之前,很多网站为了实现实时推 阅读全文
posted @ 2016-03-23 15:56 苍 阅读(1206) 评论(0) 推荐(1) 编辑
摘要: 可使用Global.asax中的Application_BeginRequest(object sender, EventArgs e)事件来实现表单或者URL提交数据的获取,获取后传给SQLInjectionHelper类ValidUrlData方法来完成检查。 首先,创建一个SQLInjecti 阅读全文
posted @ 2016-03-23 15:08 苍 阅读(1111) 评论(0) 推荐(0) 编辑
摘要: .net 计算当前时间距离今晚00:00:00还有多少分多少秒 阅读全文
posted @ 2016-03-07 11:03 苍 阅读(2503) 评论(0) 推荐(0) 编辑