This is a migrated thread and some comments may be shown as answers.

ImageLocation

2 Answers 62 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Maruf
Top achievements
Rank 1
Maruf asked on 06 Sep 2014, 10:10 AM
I would like to add a picture button over the internet.

Example:
PictureBox1.ImageLocation = "http://www.example.com/image/image.jpg" (png better though)

I want to:
RadGalleryItem1.Image = "http://www.example.com/image/image.png" (such as)

How do I make it?

2 Answers, 1 is accepted

Sort by
0
Maruf
Top achievements
Rank 1
answered on 06 Sep 2014, 10:31 AM
Is there no one to answer?
0
Dimitar
Telerik team
answered on 10 Sep 2014, 03:56 PM
Hello Maruf,

Thank you for writing.

You should manually create the image first. For example you can create a method that load images from url:
private Image LoadImage(string url)
{
    System.Net.WebRequest request =
        System.Net.WebRequest.Create(url);
 
    System.Net.WebResponse response = request.GetResponse();
    System.IO.Stream responseStream =
        response.GetResponseStream();
 
    Bitmap bmp = new Bitmap(responseStream);
 
    responseStream.Dispose();
 
    return bmp;
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Maruf
Top achievements
Rank 1
Answers by
Maruf
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or