Display list of files from Server folder in ASP.Net GridView Using C# code sample code example
Example 1: .net core download image from url binary file
using (WebClient webClient = new WebClient())
{
byte [] data = webClient.DownloadData("https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/10555140_10201501435212873_1318258071_n.jpg?oh=97ebc03895b7acee9aebbde7d6b002bf&oe=53C9ABB0&__gda__=1405685729_110e04e71d9");
using (MemoryStream mem = new MemoryStream(data))
{
using (var yourImage = Image.FromStream(mem))
{
yourImage.Save("path_to_your_file.png", ImageFormat.Png) ;
yourImage.Save("path_to_your_file.jpg", ImageFormat.Jpeg) ;
}
}
}
Example 2: android studio SQLiteDatabase delete all data in database
db.execSQL("delete from "+ TABLE_NAME);