Torna al Thread

FileStream inFile = new FileStream(Server.MapPath("../../Temp/16.jpg"), System.IO.FileMode.Open, System.IO.FileAccess.Read); byte[] binaryData = new Byte[inFile.Length]; long bytesRead = inFile.Read(binaryData, 0, (int)inFile.Length); inFile.Close(); string base64String = "file1="+Convert.ToBase64String(binaryData, 0, binaryData.Length); string strUrl = "http://11.11.11.111/Prova/recuperFile.aspx"; XMLHTTP objXMLhttp = new XMLHTTP(); objXMLhttp.open("POST", strUrl, false, "", ""); objXMLhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); objXMLhttp.send(base64String); if (objXMLhttp.status == 200) { msgErrore.Value=objXMLhttp.responseText; }else{ msgErrore.Value=objXMLhttp.responseText; }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5