How to simulate "Save Picture As" in VB.NET


New member
Aug 14, 2004
Programming Experience

I am facing a problem with VB.NET, can anybody solve my problem?
I have an asp page, which gives a new image in every request and there are about 100 images stored in a folder on the web server, the asp file generates a random number and based on that random number it creates a copy of the image file from the directory and place it in another directory with the same name [e.g. file name in the source dir is say 12.jpg and the destination image is hotnews.jpg, in the next request the file name of the source dir is say 14.jpg and the destination image is hotnews.jpg] and finally refers to that newly created file with <IMG SRC = "hotnews.jpg">.

I have a client application developed in VB.NET which uses a AxWebBrowser control to request the ".asp" page, My objective is to save/download the image shown in the browser control into a file in the local disk, for that I am using Net.WebClient, but it is not saving the image displayed in the browser control, but it is saving a new image, and the simple reason for that is the ".asp" page is made in such a way that in each request it will give you a new image.
How can I save the image displayed in the browser control as if I am simulating "right click -> Save Picture As" on the browser control?

Top Bottom