ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.[Solved] Convert Byte Array (byte) to HttpPostedFile in C# and VB.Net<p>To save Byte Array back to File, you don't need HttpPostedFile, you can easily do using File class.</p> <p><span style="text-decoration: underline;"><strong>C#</strong></span></p> <pre class="brush: csharp">//Save the Byte Array as File. string filePath = &#34;~/Files/&#34; + fileName; System.IO.File.WriteAllBytes(Server.MapPath(filePath), bytes);</pre> <p><span style="text-decoration: underline;"><strong>VB.Net</strong></span></p> <pre class="brush: vb">&#39;Save the Byte Array as File. Dim filePath As String = &#34;~/Files/&#34; + fileName System.IO.File.WriteAllBytes(Server.MapPath(filePath), bytes)</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/170074/Solved-Convert-Byte-Array-byte-to-HttpPostedFile-in-C-and-VBNet/https://www.aspforums.net:443/Threads/170074/Solved-Convert-Byte-Array-byte-to-HttpPostedFile-in-C-and-VBNet/Thu, 28 Dec 2017 00:06:44 GMT