House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  .NET Technical Talk (Net-Talk)

Net CFContent Equivalent

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Boudreau, Duane
04/01/2005 03:54 PM

Hey All, Is there a .net equivalent to CFContent Thx, Duane

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
JediHomer
04/02/2005 07:04 AM

We do something like: byte[] bytMap = null; // Call function to get map Response.Clear(); Response.AddHeader("Content-Type", "image/png"); Response.AddHeader("Content-Length", bytMap.LongLength.ToString()); Response.BinaryWrite(bytMap); Response.End(); HTH On Apr 1, 2005 8:18 PM, Boudreau, Duane <BoudreauD@ci.nashua.nh.us> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Russel Madere
04/16/2007 05:43 PM

I know this is an old post, but I want to take this a step further.  I have an application that exports PDF, XLS or DOC files from a Crystal Report.  I have that working fine, however I need to get the exported file to the user. HTTP is the best best as I am working off of a web server.  I need to trigger a new window opening and then use a derivative of this code to download the exported document.  I guess I can use a BinaryRead to get the file into stream object and then use the Response.BinaryWrite to send the stream to the client.  I just need to know how to open a new browser window. My click event for the export button is:     protected void exportByType_Click(object sender, EventArgs e)     {         ExportSetup();         ExportSelection();         ExportCompletion();     } the three functions work fine. Can someone let me know if I am on the right track? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Boudreau, Duane
04/01/2005 03:54 PM

Found my answer: Response.AddHeader("content-disposition", "attachment; filename=file.ext"); Hey All, Is there a .net equivalent to CFContent Thx, Duane


<< Previous Thread Today's Threads Next Thread >>

Search net-talk

May 25, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference