473,626 Members | 3,221 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forcing response.binary write() to open in the same frame

I am using the following code to open a CrystalReport object (cr) as a pdf
page :

Dim s As System.IO.Memor yStream =
cr.ExportToStre am(CrystalDecis ions.[Shared].ExportFormatTy pe.PortableDocF ormat)
With Response
.ClearContent()
.ClearHeaders()
.ContentType = "applicatio n/pdf"
.BinaryWrite(s. ToArray)
.End()
End With

The above opens in a separate frame. If, for example, I change the
..BinaryWrite to .Write("test"), it opens at the current frame. How could I
enforce the previous to always open in the current frame, and not open a new
window to show the .pdf stream.

Thank you for your help,
Dan Kimhi

Nov 19 '05 #1
0 1388

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

Similar topics

1
430
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 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...
4
8423
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 for me :p ) Anyway I have a file dialog box being opened using Response.AddHeader "Content-Disposition", "attachment;filename=""" & displayName & """" Response.ContentType = "application/binary"
6
3059
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders() HttpContext.Current.Response.ClearContent() HttpContext.Current.Response.ContentType = "application/pdf" Dim myBuffer(MyStream.Length) As Byte MyStream.Read(myBuffer, 0, CType(MyStream.Length, Integer)) HttpContext.Current.Response.BinaryWrite(myBuffer)
1
2399
by: abcd | last post by:
I am writing a page which uses response.binarywrite to the client, after it has completed sending the file I am interested in I want to display some mesange like "download completed" etc...I am unable to set such javascript ..... my code Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name Response.AddHeader "Content-Length", objFile.Size
1
9338
by: ChristopherABurns | last post by:
I have a very simple code snippet here: private void Page_Load(object sender, System.EventArgs e) { string filePath = Server.MapPath("\\Transcriber\\TranscriberTest\\"); string fileName = "Test.Zip"; //FileInfo fi = new FileInfo(filePath + fileName); FileStream fs = File.Open(filePath + fileName,FileMode.Open);
5
12060
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 script return me that file. But for security reason, I don't want to publish the address of this CGI, so I encapsulated it in an ASP file. This way, only this ASP file knows where the CGI is.
1
4209
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 very simple, there is a folder of files with numeric names. The real file name is stored in the database. User clicks on link that executes script and provides database record id. Record is looked up, file name is found, and browser is delivered...
1
6276
by: .nLL | last post by:
hi everyone. i use asp to send files to users to prevent hotlinking and i always used following code Response.ContentType="video/3gpp" response.addheader "Content-Disposition", "attachment;filename="& file & ";" Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open
14
11891
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 downloaded using this method. I am hosting this site on a public server, so I will not be able to change anything on the webserver. Kindly indicate what can be done to ensure that the above method remains valid for any file size download. call...
0
8265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.