Hello Joe,
As for the "how to distinguish between the image that was written to the
stream and the page itself which is being returned."
do you mean you are using httpwebrequest to get the response content of a
page, and this page has has html content and contains some images on it,
and you want to know how to get image's binary content of the the whole
page's response content?
If this is the case, I think it is no supported to get both the contained
images(<imgelements)'s binary data and the page's html content in a
single request(webrequest call). This is because html page which contains
images (<imgelements) only contains a link to the actual resource, but do
not contains the actual image binary data in the html page's content. It is
the client webbrowser who download the actual image data through the
link(url) and present it on page UI. Therefore, when you use HttpWebrequest
to retrieve web page's response, you can get string based html content
only. If you want to get image data also, you need to send additional
requests through httpWebRequest based on image's urls.
Hope this helps. If there is anything else you wonder, please feel free to
let me know.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.