How can I use response.binarywrite and frames?

V

Vinay

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
(e-mail address removed)
 
P

Peter Strøiman

Errrr - what's wrong with

<a href="somefile.jpg" target="rightframe">Click here</a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top