esk
difference between response.write and response.output.write
By esk in ASP.NET on Jan 31 2007
  • Upendra Pratap Shahi
    Aug, 2015 17

    Response.Write() and Response.Output.Write() both are used for print output on the screen. But their are is a difference between both of them1. 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 writeResponse.Write(".Net{0},"ASP"); // Its Wrong2. As Per Asp.Net 3.5, Response.Write() Has 4 overloads, with Response.Output.Write() has 17 overloads.

    • 1
  • Rajeesh Menoth
    Aug, 2015 17

    Ref this example for scott : http://www.hanselman.com/blog/ASPNETResponseWriteAndResponseOutputWriteKnowTheDifference.aspx

    • 0
  • Anand Vignesh
    Aug, 2015 11

    Hi chand, pl refer this one. http://stackoverflow.com/questions/1794792/what-s-the-difference-between-response-write-andresponse-output-write

    • 0
  • Gurjinder Singh Brar
    Jan, 2007 31

    Response.Output.Write() gives you String.Format-style formatted output and the Response.Write() doesn't.

    FOR Example
    Response.Write("Current Date Time is "+DateTime.Now.ToString());

    Response.Output.Write("{0} is {1:d}", "Current Date Time is: ",DateTime.Now);

    Thanks
    Gurjinder Singh Brar
    http://agileguru.blogspot.com/

    • 0
  • James Raja
    Jan, 2007 31

    The respose.write just outputs a string to webpage. Response.Output.Write formats the string as per specified options before writing to the the webpage

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS