Monday, February 1, 2010

Fetch Image from url in .net Compact Framework

HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(getmdthumb.Url);
myRequest.Method = "GET";
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(myResponse.GetResponseStream());
myResponse.Close();
picturebox1.image = bmp; // assigning image to picturebox

No comments:

Post a Comment