JontyMC
JontyMC

Reputation: 6068

Correct way to end response

So Response.End() is harmful, how do I flush the response and terminate it? Is this the correct way:

resp.Flush();
resp.Close();

Upvotes: 1

Views: 259

Answers (1)

Sean Reilly
Sean Reilly

Reputation: 21836

Yes, that's correct.

Actually, you don't need resp.Flush() - Close() will flush the response.

Upvotes: 1

Related Questions