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 difference between application object and session object?

4 Answers   IBS,


What are the advantages and disadvantages of session?

0 Answers  


How would you turn off cookies on a page of a website?

0 Answers  


Hi..I have created a website in Asp.net with C# i want to add Chinese language in my website..could any body tell me that how can i add dynamically this language on user's request...??? thanks n advance...

1 Answers  


Explain about Application and Session Events ?

0 Answers  






What are directives in asp.net?

0 Answers  


What tags do you need to add within the asp:datagrid tags to bind columns manually?

5 Answers   Siebel Systems,


Which control would you use if you needed to make sure the values in two different controls matched?

4 Answers   Siebel Systems,


What's the difference between viewstate and sessionstate?

0 Answers  


Distinguish between Server-side and Client-side code with its functionality?

0 Answers   Siebel,


What is difference between viewstate and session state in javascript?

0 Answers  


What is the purpose of asp.net?

0 Answers  


Categories