摘要:
summary> /// 字符串转16进制字节数组 /// /// /// //十六进制组成的字符串转成byte[]private static byte[] strToToHexByte(string hexString) { hexString = hexString.Replace(" ", ""); if ((hexString.Length % 2) != 0) hexString += " "; byte[] returnBytes = new byte[hexString.Length / 2]; for (int 阅读全文
摘要:
1.js代码function uploadFile() { var str = '' document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str) }2.页面含义html代码(页面必须含有一个runat=“server”的file对象) 3.后台页面代码 public bool attachfileupload() { Hashtable ht = new Hashtable(); HttpFileCollection files = HttpContext.Cu 阅读全文
摘要:
首先建立一个超链接其中超链接href转到Download.aspx,接着,在DownloadFile.aspx页面中使用string fileid = Request.QueryString["fileid"]; string filename = Request.QueryString["filename"]; string filepathname = Server.MapPath(@"~/upload/") + fileid; Response.Clear(); Response.ClearHeade... 阅读全文