Is HttpResponse.Write different from StringWriter.Write?

I found myself writing to a screenwriter, and then at the end of the function I do resp.Write(sw.ToString()). Is it not necessary? If I could use HttpResponse.Write several times, could it potentially send data several times (pieces), even if my page is 2k? How is HttpResponse.Write different from StringWriter.Write?

+3
source share
2 answers

In this case, there is no need to create an intermediate line. You do not need to worry about what the network stack does (HttpResponse.Write is split into several low-level sockets). However, you get maximum performance simply by writing data as soon as you have it.

+1

Response.Write

. . . ASP.NET . XML, Response.Write - . , + = . Response.Write , , .

ASP.NET

+1

Source: https://habr.com/ru/post/1732028/


All Articles