0

I am writing an ASP.NET application that generates CSV string and returns it using response.write. However, along with the CSV string, the output comes with other information I would like to get rid of (e.g. ASP.NET version, time-stamp) etc. How can I just get the CSV string and nothing else?

Johnny
  • 1
  • Code speaks louder than words - can you post your code, a sample of the output and point out what is the issue with the output? – Oded Sep 23 '10 at 18:31

1 Answers1

0

If you are on IIS7 with integrated pipeline mode you should be able to access Headers:

this.Response.Headers.Add() / Remove() etc.
this.Response.ClearHeaders();
this.Response.AddHeader("key", "value");

You're best bet might be to create an HttpModule and return your CSV from it. See answer here HttpApplication.PreSendRequestHeaders

Community
  • 1
  • 1
s_hewitt
  • 4,252
  • 24
  • 24