What is the difference between Response.Write() and Response.Output.Write() ?
Response.Write() and Response.Output.Write()
Hi
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted May 5, 2012, 1:19 AM EDT
Response.Write and Response.Output.Write are both used to write messages on the screen
Difference:
1)Response.Output.Write allows us to write a more formatted output:
example:
Response.Output.Write("hello {0}", "asp.net");
//It is Ok
But, Response.Write("hello {0}","asp.net");
//It is wrong
2) As per ASP.NET 3.5, Response.Write has 4 overloads, while Response.Output.Write has 17 overloads.
example: To write integer,double, boolean values using Response.Write, we are
provided with one overloaded version:-> Response.Write(object obj);
To do the same thing using Response.Output.Write, we are provided with separate
overloaded versions :
ex:1) Response.Output.Write(int s);
2) Response.Output.Write(double s);
3) Response.Output.Write(bool b);
Thanks