I need to display an Image in my ASP.NET ListView and I'm getting the Image through a URL. I need to get the Image from the URL and store in a DataTable row so that I can assign it as the image source.
This is what I have so far and I got stuck and lost at the end, what am I missing?
String url = "http://ift.tt/1vYFVxh...";
DataTable dt = new DataTable();
dt.Columns.Add("Picture", typeof(byte[]));
System.Windows.Media.Imaging.BitmapImage bitmapImage = new System.Windows.Media.Imaging.BitmapImage();
bitmapImage.UriSource = new Uri(url, UriKind.RelativeOrAbsolute);
DataRow dr = dt.NewRow();
......
Aucun commentaire:
Enregistrer un commentaire