This is my first attempt at creating an application, so I'm having trouble finding answers, probably due to poor vocabulary. My application is a simple SQL database interface form to my product database, which is working great.
Now, I would like to be able to show a photo of each product in the form as users access a record. Unfortunately the photo is not in my SQL database, but on my webserver, so I need to set the ImageLocation of my PictureBox to a path that includes the ProductID as the image name. So, for a product 1234, my images url is "http://mywebsite.com/images/1234 .jpg". I am trying to concatenate http://mywebsite.com/images/ + ProductID + .jpg in various ways, but having no luck.
I'm not sure how your set up is but there are several ways to concatenate strings in .NET such as
string URL = String.Format("http://mywebsite.com/images/{0}.jpg",ProductID); or string URL = "http://mywebsite.com/images/"+ProductID+".jpg";
In cases where you have a lot of strings to concatenate you can use StringBuilder.
Once you have your URL you will then need to read the image from the URL and create an ImageStream to load into your PictureBox. Here is an example of how to get the image from a URL: