472,958 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

View Multiple Binary Files(Images)

Hi,

I have simple question to ask. How to write multiple Binary files to the
Browser using Asp.Net and Visual C#.net

I have seen examples where single binary file is written to browser.

-Regards
Arun
Nov 19 '05 #1
3 3397
Hi Arun,

Welcome to ASPNET newsgroup.
As for the writing multi-file to browser, do you mean writing multiple
file stream into asp.net page's response stream, like we provide file
downloading functionality? If so, I'm afraid this is not possible because
the HTTP response has its standard structure which force it should has a
definite content-type, for example "text/xml" , "text/html",
"application/msword"... So we could only contains single stream in each
response. Even though you can manually write multi file stream into the
asp.net's response stream and specify a ambigous content-type, the
clientside browser won't be able to correctly handle it. In addition, I'm
wondering what's your detailed requirement on this , I think we may try
looking for some other means to bypass it. If you have any other questions
or ideas, please feel free to post here. Thanks,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Arun" <ar**@intersightglobal.com>
| Subject: View Multiple Binary Files(Images)
| Date: Fri, 2 Sep 2005 11:58:08 +0530
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <OK*************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: dsl-kk-070.51.101.203.touchtelindia.net 203.101.51.70
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:121932
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
|
| I have simple question to ask. How to write multiple Binary files to the
| Browser using Asp.Net and Visual C#.net
|
| I have seen examples where single binary file is written to browser.
|
| -Regards
| Arun
|
|
|

Nov 19 '05 #2
Hi,

I want to show two images or more in the browser. That's what I meant by
multi-file.

I will give you an example. We would stored many (around 10000) images in
hard-disk.
For a particular HTTP request we may have to fetch multiple images(jpg,gif)
and display it in browser.

We don't want to keep these images in Virtual Directory.

Hope you understood our needs.

-Regards
Arun

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:uj**************@TK2MSFTNGXA01.phx.gbl...
Hi Arun,

Welcome to ASPNET newsgroup.
As for the writing multi-file to browser, do you mean writing multiple
file stream into asp.net page's response stream, like we provide file
downloading functionality? If so, I'm afraid this is not possible because
the HTTP response has its standard structure which force it should has a
definite content-type, for example "text/xml" , "text/html",
"application/msword"... So we could only contains single stream in each
response. Even though you can manually write multi file stream into the
asp.net's response stream and specify a ambigous content-type, the
clientside browser won't be able to correctly handle it. In addition, I'm
wondering what's your detailed requirement on this , I think we may try
looking for some other means to bypass it. If you have any other questions or ideas, please feel free to post here. Thanks,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Arun" <ar**@intersightglobal.com>
| Subject: View Multiple Binary Files(Images)
| Date: Fri, 2 Sep 2005 11:58:08 +0530
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <OK*************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: dsl-kk-070.51.101.203.touchtelindia.net 203.101.51.70
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:121932
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
|
| I have simple question to ask. How to write multiple Binary files to the
| Browser using Asp.Net and Visual C#.net
|
| I have seen examples where single binary file is written to browser.
|
| -Regards
| Arun
|
|
|

Nov 19 '05 #3
Hi Arun,

Have you had a chance to see my last reply or have you got any progress on
this issue? If there're anything else we can help, please feel free to post
here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| X-Tomcat-ID: 32921182
| References: <OK*************@TK2MSFTNGP15.phx.gbl>
<uj**************@TK2MSFTNGXA01.phx.gbl>
<#E**************@TK2MSFTNGP09.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 05 Sep 2005 02:26:16 GMT
| Subject: Re: View Multiple Binary Files(Images)
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <3Q**************@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 130
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:122360
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Thanks for your response Arun,
|
| For displaying multiple images in webbrowser, currently the only means is
| through the <img> html element, however, when we use <img> elements in
our
| web page, that dosn't means the page which contain the <img> tags will
| contain all the binary stream of all those referenced images. At runtime,
| the browser will action like follow:
|
| 1. Browser request the web page and retrieve all the html content of that
| page and rendering in browser.
|
| 2. when we meet a <img> tag, it will lookup the "src" link and make new
| request to the remote server to retrieve image.
|
| So, as for your scenario, I think you can consider the following means:
|
| 1. Make a custom HttpHandler which will help retrieve image stream from
| your server's hard disk and write response stream out. Of course, each
| request can output only a sincle image stream.
|
| 2. In your web page, you can use <img> tag to reference image stream
| through the httphandler's url (with different qureystring parameters
| according to the image you want to retrieve).
|
| Here is a tech article discussing on building such a httphandler in
asp.net
| 1.x:
|
| #Using ASP.NET HTTP Handlers to create a photo album
|
http://www.microsoft.com/belux/nl/ms...et/httphandler.
| mspx
|
| Hope helps. Thanks,
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
| --------------------
| | From: "Arun" <ar**@intersightglobal.com>
| | References: <OK*************@TK2MSFTNGP15.phx.gbl>
| <uj**************@TK2MSFTNGXA01.phx.gbl>
| | Subject: Re: View Multiple Binary Files(Images)
| | Date: Fri, 2 Sep 2005 17:53:11 +0530
| | Lines: 81
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| | Message-ID: <#E**************@TK2MSFTNGP09.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: dsl-kk-070.51.101.203.touchtelindia.net 203.101.51.70
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:121986
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Hi,
| |
| | I want to show two images or more in the browser. That's what I meant by
| | multi-file.
| |
| | I will give you an example. We would stored many (around 10000) images
in
| | hard-disk.
| | For a particular HTTP request we may have to fetch multiple
| images(jpg,gif)
| | and display it in browser.
| |
| | We don't want to keep these images in Virtual Directory.
| |
| | Hope you understood our needs.
| |
| | -Regards
| | Arun
| |
| |
| |
| | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| | news:uj**************@TK2MSFTNGXA01.phx.gbl...
| | > Hi Arun,
| | >
| | > Welcome to ASPNET newsgroup.
| | > As for the writing multi-file to browser, do you mean writing multiple
| | > file stream into asp.net page's response stream, like we provide file
| | > downloading functionality? If so, I'm afraid this is not possible
| because
| | > the HTTP response has its standard structure which force it should
has a
| | > definite content-type, for example "text/xml" , "text/html",
| | > "application/msword"... So we could only contains single stream in
| each
| | > response. Even though you can manually write multi file stream into
the
| | > asp.net's response stream and specify a ambigous content-type, the
| | > clientside browser won't be able to correctly handle it. In
addition,
| I'm
| | > wondering what's your detailed requirement on this , I think we may
try
| | > looking for some other means to bypass it. If you have any other
| | questions
| | > or ideas, please feel free to post here. Thanks,
| | >
| | > Regards,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | >
| | >
| | >
| | > --------------------
| | > | From: "Arun" <ar**@intersightglobal.com>
| | > | Subject: View Multiple Binary Files(Images)
| | > | Date: Fri, 2 Sep 2005 11:58:08 +0530
| | > | Lines: 11
| | > | X-Priority: 3
| | > | X-MSMail-Priority: Normal
| | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| | > | Message-ID: <OK*************@TK2MSFTNGP15.phx.gbl>
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | > | NNTP-Posting-Host: dsl-kk-070.51.101.203.touchtelindia.net
| 203.101.51.70
| | > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| | > | Xref: TK2MSFTNGXA01.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet:121932
| | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | > |
| | > | Hi,
| | > |
| | > | I have simple question to ask. How to write multiple Binary files
to
| the
| | > | Browser using Asp.Net and Visual C#.net
| | > |
| | > | I have seen examples where single binary file is written to browser.
| | > |
| | > | -Regards
| | > | Arun
| | > |
| | > |
| | > |
| | >
| |
| |
| |
|
|

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Patrick Blackman | last post by:
How do you create a TIFF to store multiple images?
2
by: Netian | last post by:
Hello , Please teach me how to create an Icon object with multiple images by GDI++ . I can create an Icon with a image as following , but can't do an Icon with multiple images. private Icon...
0
by: Just Jeff | last post by:
Hi, I am a newbie to CSS. My problem at this point has to do with layout. I've inherited a website that uses nested tables for the layout of the page (www.gccnh.com), which I would like to...
4
by: hashyborndon | last post by:
hi i am supposed to work with binary images and to count the object in it But i dont know where to start from I mean i dont know what should i read to be able to do this. Someone told to use...
3
by: mmr315 | last post by:
i am able to get single image at once but how to get multiple images at once
11
by: Jankie | last post by:
I need to dispaly a user's multiple images in one entry.Right now,say if a user uploads 3 images,three entries for the same id display to match 3 images. I only want 1 entry to display all of a...
5
by: swethak | last post by:
Hi,. when i display the image by using below code i got the error as image displayed in the form of garbage value format.plz tell that what's the mistake in my code. <?php...
1
by: =?Utf-8?B?UmFqYWdvcGFs?= | last post by:
Question How to Upload multiple images in asp.net? (ex.Like a gmail file field)
2
by: sarayu | last post by:
Hi All, How can i select multiple images by using shift or control key from my hard disk and upload it by using a submit button.For this what we use for selecting different images and...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.