0

I have written code to display the data in table.. but they are coming together when I display and it looks like mess. The newline character '\n' is not working here.. It will give only one space gap.. I am using visual studio 2008 for coding and using c# for programming. Please have a look at my page and tell what new line character I need to use.

foreach (DataRow row in dataTablesell.Rows)
            {
                Response.Write(row["scriptname"].ToString()); 
                Response.Write(row["accnum"].ToString());
                Response.Write(row["Quantity"].ToString());
                Response.Write(row["price"].ToString());
                Response.Write("\n");

            }

The Output of this will come as ----> script4201025 script4151050 But I need every row to come in new line In the first line "scrpt4 20 10 25" and in second line "script4 15 10 50"

1 Answers1

0

instead of

Response.Write("\n");

use break tag

Response.Write("<br/>");

for Break tag

Dgan
  • 10,077
  • 1
  • 29
  • 51