Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to display the multiple image file in a single window.
I am storing the files with the help of arraylist after that i am retrieving the file with the help of arraylist.
I am using binarywrite to display multiple images but it show the error like unable to cast object.

Can you Please help to resolve this solution.

This is my code:

For i = 0 To fname1.Count - 1
                Response.Clear()
                Response.ContentType = "image/JPEG"
                Response.BinaryWrite(fname1(i))
                Response.Flush()
                Response.End()
            Next


Thanks in Advance.
Posted
Updated 23-May-11 0:37am
v2
Comments
[no name] 23-May-11 6:37am    
Edited for Code Block..

I'm just guessing here, but I don't think that would work anyway: you probably want to read the file rather than sending the file name to the page...

Look at File.ReadAllBytes, and try sending that instead...
 
Share this answer
 
Hi,

I tried that too, but in this it not showing the image file.

Thanks in advance
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900