I get an error (Server cannot set content type after HTTP headers have been sent.) on the following code (ContentType line). What should I change?
ContentType
Have a look at HttpResponse.BufferOutput Property
http://msdn.microsoft.com/en-us/library/33cy25ty%28v=vs.100%29.aspx