TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Resmi Satish
NA
110
75.3k
More than one Image displaying using Http handler
Jul 1 2013 4:47 AM
I am having a handler page which has been used for displaying images.When I have to display a single image ,every thing is working fine.
Please find below my code:
byte[] imgReceipt;//Contains the image to display which will be fetched from database.
MemoryStream stream = new MemoryStream(imgReceipt);
if (stream.Length > 1)
{
context.Response.ContentType = contentType;
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.BufferOutput = false;
const int buffersize = 1024 * 16;
byte[] buffer = new byte[buffersize];
int count = stream.Read(buffer, 0, buffersize);
while (count > 0)
{
context.Response.OutputStream.Write(buffer, 0, count);
count = stream.Read(buffer, 0, buffersize);
}
}
How we can display more than one image using the above code?
I am displaying the image in a new page so that next image should load when we click the next button in window picture viewer.
Reply
Answers (
4
)
Timeout expired.
what is the use of relations in dataset c#