What is the ASP.Net equivalent to PHP's Echo?

delete picture delete · Jun 4, 2010 · Viewed 49.8k times · Source

I want to 'echo' a string separated by delimeters like: sergio|tapia|1999|10am

the Body of an HTML page.

How can I achieve this? Thank you!

Answer

Oded picture Oded · Jun 4, 2010

Use Response.Write(string).

There are a couple of shortcuts to Response.Write if you are trying to output on the page:

<%="sergio|tapia|1999|10am"%>

Or

<%:"sergio|tapia|1999|10am"%> (.NET 4.0)

See here for the different options.