What is the main use of Response.Output.Write()?
Answers were Sorted based on User's Feedback
Answer / psetty
To write formatted output Response.Output.Write() function
is used.
| Is This Answer Correct ? | 23 Yes | 3 No |
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 |
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 |
Any one can tell how we store tiff format images in database and retrive from the database(need for tiff format only)
To display data in a Repeater control which templete is provided ?
What is a session in asp.net?
Explain the functionality of "EnableViewState" ? What happens if you want it on or off?
Explain server-side scripting and client-side scripting.
Explain diff between dataset and datareader?
Which authentication uses a combination of windows and iis authentication?
How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?
What is paging in context of Memory?
What is session and cookies in asp.net?
How to prevent client side validation from the ASP.NET validation controls?
What is strong name and which tool is used for this?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)