将数据库二进制文件读出并保存到磁盘上

//主要适用FileStream类,如下
private void WriteToFile(string strPath, ref byte[] Buffer)
{
    // Create a file
    FileStream newFile = new FileStream(strPath, FileMode.Create);

     // Write data to the file
    newFile.Write(Buffer, 0, Buffer.Length);

    // Close file
    newFile.Close();
}


当然,如果是适用file控件,可以添加如下代码
 fl_upload.PostedFile

原文地址:https://www.cnblogs.com/mqingqing123/p/956352.html