Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2003, 12:52 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mixing text and binary response yields extra chars

I'm trying to write a control that puts the result of an xslt transform into the response stream. Since the xsltransform.transform method can take a stream object for the result, it's pretty simple and efficient to just pass it Response.OutputStream. By itself it works fine but if I do a response.write before it, the chars in the response stream up until the write to outputstream are encapsulated with what looks like 3 extended ascii chars; an i with two dots over it, a double greater-than, and an upside-down question mark (I can get the actuall hex or octal values if anyone thinks it will help).

So when I do something like this...
Code:
xslt.Transform(xPathDoc, null, Response.OutputStream);
...I get an output like this
Code:
resultsOfXSLTransform
when i do this...
Code:
Response.Write("Hello");
xslt.Transform(xPathDoc, null, Response.OutputStream);
...I get an output like this
Code:
<EASCIIchars here>Hello<EASCIIchars here>resultOfXSLTransform
I realize that we could mix text and binary output in old asp and that I could write the results of the transform to a temp stream and convert that to text, but this way seems more efficient (and more interesting to solve ;).

B
 
Old June 11th, 2003, 12:54 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:
I realize that we could mix text and binary output...
I meant to say COULD NOT mix..

B





Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary Search on a text file scoobie Pro Java 1 August 25th, 2006 12:43 AM
EXTRA TEXT AREA ON USER'S REQUEST satishb Classic ASP Databases 0 November 11th, 2003 07:39 AM
Text import - an extra bit Morris Access 6 August 11th, 2003 12:51 PM
Reading from a text file and writing to a Binary 1 scott01 C++ Programming 0 July 28th, 2003 03:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.