ASP.NET raw output to browser?

M

Marcel Müller

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
 
D

Davej

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.
 
A

Arne Vajhøj

D

Davej

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.
 
A

Arne Vajhøj

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
 
R

Registered User

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top