Difference
between Response.Write and Response.Output.Write
-
S.No
Response.Write Response.Output.Write 1 Response.Write does not allow us to write a more formatted output. Response.Output.Write allows us to write a more formatted output. 2As per ASP.NET 3.5, Response.Write has 4 overloadsResponse.Output.Write has 17 overloads.
Example-1:
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);
Example-2:
Response.Output.Write("hello {0}", "asp.net"); //It is Ok
But, Response.Write("hello {0}","asp.net"); //It is wrong
No comments:
Post a Comment