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?
>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:
>> Hey All,
>>
>> Is there a .net equivalent to CFContent
>>
>> Thx,
>> Duane
>>
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RV
JS
Archive: http://www.houseoffusion.com/groups/Net-T
alk/message.cfm/messageid:3876
Subscription: http://www.houseoffusion.com/groups/Net-Talk/subscribe
.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.44
|