what is difference between Response.write and Response.output开发者_StackOverflow社区.write please give me example
Response.Output.Write
allows you to format the string before outputting, Response.Write
simply writes it out as is.
Response.Write
will output exactly what you pass in.
Response.Output
exposes the underlying TextWriter
, so Response.Output.Write
has many more overloads, some with String.Format
functionality.
There is no difference. Response.Write
is a convenience accessor to Response.Output.Write
.
You could have found out this by yourself if you installed reflector and looked up the class HttpResponse
(in the assembly System.Web
).
精彩评论