Link to home
Start Free TrialLog in
Avatar of qfren
qfren

asked on

Response.ContentType : reading file from database (binary) will append html code !

hi experts:
I m using MS 2005 with .net 2.0

my app save  file into database table in binary type, and then i will retrieve it to open and view it.
Everytime work ok. But  i found that now if i open from database a text file (.txt) from my own machine localhost then nothing wrong with the content, but when i deploy to another server and access the same app (on that server ) and open the file again,the content of the text file will append the html code of current page below the orignal contents!!

pls help...


Avatar of bennyshoham
bennyshoham

use  Response.Clear(); before starting to write the response.
Avatar of qfren

ASKER

hi,

Thanks for reply.
i did it in exisiting code.
Please attach existing code so i can see what is missing.
ASKER CERTIFIED SOLUTION
Avatar of qfren
qfren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial