Response.Write() and Response.Output.Write() both are used for print output on the screen.
But their are is a difference between both of them
1. Response.Output.Write() is allows us to print formatted output but Response.Write() can't allows the formatted output.
Example:
Response.Output.Write(".Net{0},"ASP"); // Its write
Response.Write(".Net{0},"ASP"); // Its Wrong
2. As Per Asp.Net 3.5, Response.Write() Has 4 overloads, with Response.Output.Write()
has 17 overloads .
But their are is a difference between both of them
1. Response.Output.Write() is allows us to print formatted output but Response.Write() can't allows the formatted output.
Example:
Response.Output.Write(".Net{0},"ASP"); // Its write
Response.Write(".Net{0},"ASP"); // Its Wrong
2. As Per Asp.Net 3.5, Response.Write() Has 4 overloads, with Response.Output.Write()
has 17 overloads .
wt do u mean by overloads in point 2
ReplyDeleteOverloads means it process of creating a more then one method in a class with the same name.
DeleteHere i would like to add one more point
ReplyDeleteResponse.Write()is used to display only string and you can not display any other data type values like int,date,etc.Conversion(from one data type to another) is not allowed. whereas by using Response .Output .Write() we can display any type of data like int, date ,string etc.,by giving index values.
Simply Response.write() is used to display the normal text and Response.output.write() is used to display the formated text.
yes right udayasri thank you
ReplyDelete