锘??xml version="1.0" encoding="utf-8" standalone="yes"?>一级日本不卡的影视,欧美日韩国产精品专区,日韩电影在线观看完整版 http://www.aygfsteel.com/freebird/category/29499.html錛嶏紞錛嶏紞鎴戝枩嬈㈢殑瀛︿範璧勬枡鏀惰棌鐨勫疂鍦幫紝瀛︿範絎旇鐨勮褰曞満鍦幫紝浜ゆ祦鐨勪箰鍥?/description>zh-cn Mon, 18 Feb 2008 17:32:42 GMT Mon, 18 Feb 2008 17:32:42 GMT 60 鍦ˋSP.NET涓笅杞絋ext鏂囦歡錛岃屼笉鏄湪嫻忚鍣ㄤ腑鎵撳紑瀹?杞? http://www.aygfsteel.com/freebird/archive/2008/02/18/180460.htmlfreebird freebird Mon, 18 Feb 2008 06:32:00 GMT http://www.aygfsteel.com/freebird/archive/2008/02/18/180460.html http://www.aygfsteel.com/freebird/comments/180460.html http://www.aygfsteel.com/freebird/archive/2008/02/18/180460.html#Feedback 0 http://www.aygfsteel.com/freebird/comments/commentRss/180460.html http://www.aygfsteel.com/freebird/services/trackbacks/180460.html
浠嬬粛
璁╃敤鎴蜂粠鎴戜滑鐨勭綉绔欎笂涓嬭澆鍚勭綾誨瀷鐨勬枃浠舵槸涓涓瘮杈冨父鐢ㄧ殑鍔熻兘錛岃繖綃囨枃绔犲氨鏄憡璇夋偍濡備綍鍒涘緩涓涓?txt鏂囦歡騫惰鐢ㄦ埛涓嬭澆銆?/font>
浣跨敤浠g爜
铏界劧鍦ㄧず渚嬮噷錛屾垜鍏堝垱寤轟簡涓涓猼ext鏂囦歡錛屼絾鏄綘涓嶄竴瀹氫篃瑕佽繖涔堝仛錛屽洜涓鴻繖涓枃浠跺彲鑳藉湪浣犵殑緗戠珯閲屽凡緇忓瓨鍦ㄤ簡銆傚鏋滄槸榪欐牱鐨勮瘽錛屼綘鍙渶瑕佷嬌鐢‵ileStream鍘昏鍙栧畠灝卞彲浠ヤ簡銆?/font>
棣栧厛錛屾垜浠皢榪欎釜text鏂囦歡璇誨彇鍒頒竴涓猙yte鏁扮粍涓紝鐒跺悗浣跨敤Response瀵硅薄灝嗘枃浠跺啓鍒板鎴風灝卞彲浠ヤ簡銆?/font>
Response.AddHeader("Content-disposition ", "attachment; filename= " + sGenName); Response.ContentType = "application/octet-stream "; Response.BinaryWrite(btFile); Response.End();
榪欐浠g爜鏄畬鎴愯繖涓姛鑳界殑涓昏浠g爜銆傜涓鍙ュ湪杈撳嚭涓坊鍔犱簡涓涓狧eader錛屽憡璇夋祻瑙堝櫒鎴戜滑鍙戦佺粰瀹冪殑鏄竴涓檮浠剁被鍨嬬殑鏂囦歡銆傜劧鍚庢垜浠緗緭鍑虹殑ContentType鏄?application/octet-stream"錛屽嵆鍛婅瘔嫻忚鍣ㄨ涓嬭澆榪欎釜鏂囦歡錛岃屼笉鏄湪嫻忚鍣ㄤ腑鏄劇ず瀹冦?br />
涓嬮潰鏄竴涓狹IME綾誨瀷鐨勫垪琛ㄣ?/div>
".asf" = "video/x-ms-asf" ".avi" = "video/avi" ".doc" = "application/msword" ".zip" = "application/zip" ".xls" = "application/vnd.ms-excel" ".gif" = "image/gif" ".jpg"= "image/jpeg" ".wav" = "audio/wav" ".mp3" = "audio/mpeg3" ".mpg" "mpeg" = "video/mpeg" ".rtf" = "application/rtf" ".htm", "html" = "text/html" ".asp" = "text/asp" '鎵鏈夊叾瀹冪殑鏂囦歡 = "application/octet-stream" 涓嬮潰鏄竴涓畬鏁寸殑濡備綍涓嬭澆鏂囨湰鏂囦歡鐨勭ず渚嬩唬鐮?br />C#protected void Button1_Click(object sender, EventArgs e) {string sFileName = System.IO.Path.GetRandomFileName();string sGenName = "Friendly.txt ";//YOu could omit these lines here as you may not want to save the textfile to the server //I have just left them here to demonstrate that you could create the text file using (System.IO.StreamWriter SW = new System.IO.StreamWriter(Server.MapPath("TextFiles/ " + sFileName + ".txt "))) { SW.WriteLine(txtText.Text); SW.Close(); } System.IO.FileStream fs = null ; fs = System.IO.File.Open(Server.MapPath("TextFiles/ " + sFileName + ".txt "), System.IO.FileMode.Open);byte [] btFile = new byte [fs.Length]; fs.Read(btFile, 0, Convert.ToInt32(fs.Length)); fs.Close(); Response.AddHeader("Content-disposition ", "attachment; filename= " + sGenName); Response.ContentType = "application/octet-stream "; Response.BinaryWrite(btFile); Response.End(); }
VB.NET
Dim strFileName As String = System.IO.Path.GetRandomFileName()Dim strFriendlyName As String = "Friendly.txt "Using sw As New System.IO.StreamWriter(Server.MapPath("TextFiles/ " + strFileName + ".txt ")) sw.WriteLine(txtText.Text) sw.Close()End Using Dim fs As System.IO.FileStream = Nothing fs = System.IO.File.Open(Server.MapPath("TextFiles/ " + strFileName + ".txt "), System.IO.FileMode.Open)Dim btFile(fs.Length) As Byte fs.Read(btFile, 0, fs.Length) fs.Close()With Response .AddHeader("Content-disposition ", "attachment;filename= " & strFriendlyName) .ContentType = "application/octet-stream " .BinaryWrite(btFile) .End ()End With
灝忕粨
浣跨敤榪欎釜鏂規硶錛屼綘鍙互瀹炵幇鍦╓indows緋葷粺涓嬩笅杞芥墍鏈夌殑鏂囦歡綾誨瀷銆備絾鏄湪Macintosh緋葷粺涓嬩細鏈変簺闂銆?/font>
]]>
主站蜘蛛池模板:
葵青区 |
仁布县 |
永新县 |
广灵县 |
平潭县 |
加查县 |
岱山县 |
新营市 |
雷州市 |
灵台县 |
西宁市 |
稷山县 |
佛山市 |
镇安县 |
西华县 |
沙湾县 |
信宜市 |
芒康县 |
内丘县 |
海盐县 |
石狮市 |
静安区 |
通榆县 |
黔南 |
沙雅县 |
合阳县 |
大埔县 |
江西省 |
利辛县 |
吉林省 |
绥江县 |
丰县 |
江达县 |
杭州市 |
新津县 |
阿坝 |
北海市 |
通山县 |
昭苏县 |
汤原县 |
原阳县 |