I want to save pictures, and show them in a gridview with the name, description, price, and other things, but I don't know how to do it. First, how should I upload the image? I'm currently using a Windows Forms application to save the other information, but I now need to save the image as well. These images will need to be viewed from a web page in an ASP.NET application.
I don't think I need to save the path, because other users will be loading it via the web page on their computer. What's the best format to use in the database varbinary
or image
. I'm not sure how to use these or how to make them visible in the gridview. I do know how to do it if I have the path to the image, but not if the image is in the database.
Can anyone show me how to store the image in a database then display it in a gridview?