ASP.NET raw output to browser?

  • Thread starter Thread starter Davej
  • Start date Start date
What is the ASP.NET equivalent to Java PrintWriter?

I don't know Java, but Response.Write() sounds like what you seek for.
But you should have good reasons to use this.


Marcel
 
I don't know Java, but Response.Write() sounds like what you seek for.
But you should have good reasons to use this.

Marcel

I want to do Ajax without Javascript.
 
Java servlet:

PrintWriter out = response.getWriter();
out.println("Hello world");

is the equivalent of a ASP.NET web handler (.ashx file) with:

TextWriter out = context.Response.Output;
out.WriteLine("Hello world");

But note that you should not use Java servlet or ASP.NET web handler
to output HTML!

Arne

By "HTML" do you mean port 80 or do you mean HTML tags? I want to
receive data with WebClient in the response packet in the same manner
that Ajax would. Thanks.
 
By "HTML" do you mean port 80 or do you mean HTML tags? I want to
receive data with WebClient in the response packet in the same manner
that Ajax would.

I mean HTML tags.

If you return XMl or JSON then a web handler is a fine
solution.

Arne
 
Then you want to do Aax....
Aren't Google and Oracle squabbling about whether Aax is under copyright or not?

I'm guessing the OP wants to use Ajax without using the OOB tools. If the idea
is to dynamically write the Javascript as the page is built, the
ClientScriptManager type is worth investigating.

regards
A.G.
 
Back
Top