[转][C#]清除缓存aspx
摘要:代码: Response.BufferOutput = true; Response.Cache.SetExpires(DateTime.Now.AddMilliseconds(-1)); Response.Cache.SetCacheability(HttpCacheability.NoCache
阅读全文
posted @
2021-04-25 23:59
z5337
阅读(106)
推荐(0) 编辑
[转][C#]简单的防SQL注入方式
摘要:上代码: 在 Global.asax 文件中: //在接收到一个应用程序请求时触发。对于一个请求来说,它是第一个被触发的事件,请求一般是用户输入的一个页面请求(URL)。 void Application_BeginRequest(object sender, EventArgs e) { //Re
阅读全文
posted @
2021-04-25 23:56
z5337
阅读(1357)
推荐(1) 编辑
[转][C#]身份证验证
摘要:1、正则:\d{17}[\d|X]|\d{15} 2、校验: using System; /// <summary> /// Summary description for IDCardValid /// </summary> public class IDCardValid {/// <summa
阅读全文
posted @
2021-04-25 23:51
z5337
阅读(246)
推荐(0) 编辑
[转][C#]图片上添加水印、缩略图
摘要:直接上代码: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using Syste
阅读全文
posted @
2021-04-25 23:49
z5337
阅读(102)
推荐(0) 编辑
[转][C#]记录VS2019下载安装经历(含VS2022)
摘要:参考:https://blog.csdn.net/weixin_36397141/article/details/106437814 先上成功截图: 下载时进度一直为0时,可以在此路径查看日志文件: C:\Users\Administrator\AppData\Local\Temp\dd_vs_en
阅读全文
posted @
2021-04-25 18:31
z5337
阅读(494)
推荐(0) 编辑
[转][C#]自定义提示控件
摘要:实现了提示控件(picture1)随着鼠标而移动,但点击时仍会显示(是一个BUG) 需要绑定事件到 form、panel1、picture1、等控件 private void panel1_MouseMove(object sender, MouseEventArgs e) { //timer1.S
阅读全文
posted @
2021-04-18 22:08
z5337
阅读(86)
推荐(0) 编辑