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

How many modelpopup extender we frequire when we want more than one model popup on same page ?

3 Answers   TCS,


Explain the benefits of viewstate?

0 Answers  


Define caching.

0 Answers  


What is comparevalidator?

0 Answers  


Explain the difference between globalization and localization techniques

0 Answers  






How does a content page differ from a master page?

0 Answers  


What is slidemaster?

0 Answers  


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

2 Answers  


Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal

0 Answers  


1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5

0 Answers   TCS,


What is cookies in asp net?

0 Answers  


What r all the controls in ASP.NET ?

3 Answers  


Categories