What is the main use of Response.Output.Write()?

Answers were Sorted based on User's Feedback



What is the main use of Response.Output.Write()?..

Answer / psetty

To write formatted output Response.Output.Write() function
is used.

Is This Answer Correct ?    23 Yes 3 No

What is the main use of Response.Output.Write()?..

Answer / varun

In ASP.NET the Response object is of type HttpResponse and
when you say Response.Write you're really saying
(basically) HttpContext.Current.Response.Write and calling
one of the many overloaded Write methods of HttpResponse.

Response.Write then calls .Write() on it's internal
TextWriter object:

public void Write(object obj){ this._writer.Write(obj);}

HttpResponse also has a Property called Output that is of
type, yes, TextWriter, so:

public TextWriter get_Output(){ return this._writer; }

Which means you can to the Response whatever a TextWriter
will let you. Now, TextWriters support a Write() method
ala String.Format, so you can do this:

Response.Output.Write("Scott is {0} at
{1:d}", "cool",DateTime.Now);

But internally, of course, this this is happening:

public virtual void Write(string format, params object[]
arg)
{
this.Write(string.Format(format, arg));
}

Is This Answer Correct ?    10 Yes 1 No

What is the main use of Response.Output.Write()?..

Answer / varun

The difference between Response.Write() and
Response.Output.Write() in ASP.NET. The short answer is
that the latter gives you String.Format-style output and
the former doesn't. The long answer follows.

Is This Answer Correct ?    9 Yes 2 No

What is the main use of Response.Output.Write()?..

Answer / bhuuuuuuuu

IT is all useless

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is the usie of activex control in .net?

0 Answers  


Suggest 3 best practices in detail for for Developing High Performance Web and Enterprise Applications

2 Answers   Techno Solutions,


How does the regular expression validator work? What are two situations when you might want to use one?

2 Answers  


What Is ASPNET_WP.exe? What Is The Use Of It? In Which Place Inproc Session Stored ? Explain Session State ?

2 Answers   Phoenix Technologies,


How would one do a deep copy in .NET?

6 Answers   TCS,






What are the different Key TreeView Properties in Asp.net 2.0?

1 Answers   TCS,


what is the role of aspx file ?

2 Answers   Netsweeper,


can i use two web.config files of ConnectionString in One Default.aspx page

6 Answers   Satyam, Verinon Technology Solutions, Wipro,


how can i insert array values and retreive in asp.net

3 Answers   TCS, Value Labs,


If you have to replicate a set of controls(UI) across a number of web pages, what will you do

1 Answers  


can u create two Primary key for a table? --Sivaa

10 Answers   BirlaSoft,


What are the different authentication modes in asp.net?

0 Answers  


Categories