摘要:
1usingSystem;2usingSystem.Data;3usingSystem.Configuration;4usingSystem.Collections;5usingSystem.Web;6usingSystem.Web.Security;7usingSystem.Web.UI;8usingSystem.Web.UI.WebControls;9usingSystem.Web.UI.We... 阅读全文
摘要:
DriveInfo[] allDrive = DriveInfo.GetDrives();//获取一个DriveInfo对象数组,代表当前计算机的所有逻辑分区 foreach (DriveInfo item in allDrive) { if (item.IsReady)//验证磁盘空间是否可读,一免不可读的异常。 { if (item.Name.ToUpper().ToString()... 阅读全文
摘要:
protected void btnup_Click(object sender, EventArgs e) { if (lb_busspot.SelectedIndex == -1) { return; } //获得连续选中的项索引 int[] Indices = lb_busspot.GetSelectedIndices(); int length = Indices.Length; st... 阅读全文
摘要:
配置httpRuntime也可以让FileUpload上传更大的文件,不过设置太大了会因用户将大量文件传递到该服务器而导致的拒绝服务攻击(属性有说明) <httpRuntime><httpRuntime useFullyQualifiedRedirectUrl="true|false" maxRequestLength="size in kbytes" executionTime... 阅读全文
摘要:
在Global.asax启动一条线程就ok了,下面是启动线程定时写文件的例子 Global.asax C# code 1<%@ApplicationLanguage="C#"%>2<%@ImportNamespace="System.IO"%>3<%@ImportNamespace="System.Threading"%>4<scriptrunat=... 阅读全文