473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How can I use response.binarywrite and frames?

Hi All:

I have a frameset (right and left). In the left frame I have a listbox that
contains items. When the user clicks on any one of these items (each item
points to either a word document or an image) - I'd like to show this (image
or word document) in the frame on the right. Would anyone have any ideas on
how I can do this? The code I currently have is:

I am trying to figure out what response.redirectlocation does - without much
luck.
Dim filename As String = "C:\temp\p.jpg"
Response.ContentType = "text/HTML"
Response.AddHeader("content-disposition", "attachment; filename=" & fn)
Dim adoStream As ADODB.Stream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(fn)
Response.BinaryWrite(adoStream.Read())
adoStream.Close() : adoStream = Nothing
Response.End()

TIA

Vinay
vi******@nospam.yahoo.com.nospam
Nov 22 '05 #1
2 2600
Errrr - what's wrong with

<a href="somefile.jpg" target="rightframe">Click here</a>
"Vinay" <vi*************@nospam.yahoo.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Hi All:

I have a frameset (right and left). In the left frame I have a listbox that contains items. When the user clicks on any one of these items (each item
points to either a word document or an image) - I'd like to show this (image or word document) in the frame on the right. Would anyone have any ideas on how I can do this? The code I currently have is:

I am trying to figure out what response.redirectlocation does - without much luck.
Dim filename As String = "C:\temp\p.jpg"
Response.ContentType = "text/HTML"
Response.AddHeader("content-disposition", "attachment; filename=" & fn)
Dim adoStream As ADODB.Stream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(fn)
Response.BinaryWrite(adoStream.Read())
adoStream.Close() : adoStream = Nothing
Response.End()

TIA

Vinay
vi******@nospam.yahoo.com.nospam

Nov 22 '05 #2
Errrr - what's wrong with

<a href="somefile.jpg" target="rightframe">Click here</a>
"Vinay" <vi*************@nospam.yahoo.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Hi All:

I have a frameset (right and left). In the left frame I have a listbox that contains items. When the user clicks on any one of these items (each item
points to either a word document or an image) - I'd like to show this (image or word document) in the frame on the right. Would anyone have any ideas on how I can do this? The code I currently have is:

I am trying to figure out what response.redirectlocation does - without much luck.
Dim filename As String = "C:\temp\p.jpg"
Response.ContentType = "text/HTML"
Response.AddHeader("content-disposition", "attachment; filename=" & fn)
Dim adoStream As ADODB.Stream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(fn)
Response.BinaryWrite(adoStream.Read())
adoStream.Close() : adoStream = Nothing
Response.End()

TIA

Vinay
vi******@nospam.yahoo.com.nospam

Nov 22 '05 #3

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

Similar topics

1
by: Vinay | last post by:
Hi All: I have a frameset (right and left). In the left frame I have a listbox that contains items. When the user clicks on any one of these items (each item points to either a word document or...
4
by: Max Dupenois | last post by:
I've seen numerous articles with similair (similar sp?) titles to this in my search.. unfortunately none of them seem to contain what i want, (or if they do i need someone to point out my stupidity...
5
by: katrinaVictim | last post by:
Question: I get the eror listed at the bottom of the post. What can I do to make the response of the x1.send a "binary" type? Or, in general, how can I just "make this work"? <%@...
2
by: hoenes1 | last post by:
I've got an aspx-Page "SendFile.aspx" which is called by a Link on "ShowListOfFiles.aspx" and sends the file in the OnLoad Eventhandler. The filename to download is stored in a Session variable....
1
by: Sridhar | last post by:
Hi, I am trying to display a pdf file on the web. It is working fine but the Page_Load method is running twice before displaying the page. Here is the code that I am using Private Sub...
2
by: ATS | last post by:
HOWTO Override ASP's Response output for 2003/IIS. Please help, I want to have an ASP page write back EVERYTHING to the ASP Response. That includes HTTP Headers. I want my ASP to look...
5
by: Katie | last post by:
Hi, I made a posting a while ago regarding doing a binarywrite of a large file in chunks and got a lot of helpful responses. I was able to make it work then. Unfortunately when the project is...
5
by: twiggy182 | last post by:
Hi, I really need you help because I'm not very familliar with ASP and I could not find any solution to my problem. To put you in situation, I have a CGI to which I send a file name, and that...
1
by: mattridings | last post by:
Hi gang, Have a script that works fine. However, it's really cpu intensive and I'm looking for suggestions on a) whether or not that's normal and if so b)a better way of doing it. Script is...
14
by: S N | last post by:
I am using the following code to hide the download url of files on my website. The code uses Response.Binarywrite to send file to the client. Kindly indicate the maximum size of the file that can be...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.