ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 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>, 28 Dec 2017 00:06:44 GMT