I was working with a generic handler that sends back an XML file as the response, and using code that I already had that did the same thing, from 2 different sources.
The thing is, both sources end their block of code differently, first I have this block
context.Response.Clear()
context.Response.AppendHeader("Content-Disposition", "Attachment; filename=filename")
context.Response.ContentType = "text/xml"
context.Response.Write(myXML)
context.Response.Flush()
context.Response.End()
And then I have the same thing, except that the last line is context.ApplicationInstance.CompleteRequest()
instead of context.Response.End()
So I wanted to know what was the difference between both of those lines and which one should I be using
Thanks.