ASP Response.Write newline

Hi, all of you who have used ASP may have encountered situations where you require to write a text output to the screen. It can be easily done by using

Response.Write("Hello world");

However, if you wish to append some more text to a newline, it would not work in the following ways.

Response.Write("Hello world \n");
Response.Write("Good day.");

The output of the above lines would be

Hello world Good day.

and NOT

Hello world
Good day.

In order to overcome this, you can very simple place an html break tag inside the code.

Response.Write("Hello world");
Response.Write("<br/>");
Response.Write("Good day.");

The output would be the following.

Hello world
Good day.


Cheers !!!

Comments

Popular posts from this blog

Encrypt and Decrypt Images Using Java

Build your own Network sniffer