Hi sir,
hope doing well,
sir i have seen in your's Save and Retrieve Files from SQL Server Database using ASP.Net
there it is accepting only specific file but i want it should take all type of files. and store it in the database.
plz help me.
thanks in advance.
foreach (string file in Directory.GetFiles("C\\Data\\")) { using (FileStream fs = File.OpenRead(file)) { byte[] bytes = new byte[fs.Length]; fs.Read(bytes, 0, Convert.ToInt32(fs.Length)); fs.Close(); //Save the bytes to database here } }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.