Mathie
03-09-2006, 03:00 PM
when i write this code:
for(int i = 0; i < list.Length; i++)
{
string name = list[i].GetName();
string address = list[i].GetAddress();
string city = list[i].GetCity();
string state = list[i].GetState();
string zip = list[i].getZip();
string url = list[i].getURL();
Response.Write(name);
Response.Write("\n");
Response.Write(address);
Response.Write("\n");
Response.Write(city);
Response.Write("\n");
Response.Write(state);
Response.Write("\n");
Response.Write(zip);
Response.Write("\n");
Response.Write(url);
Response.Write("\n");
i want the result to be this:
name
address
city, state zip
phone
name
address
city, state zip
phone
.........
but it is like this:
BUSINESS FORUM 9297 BURTON WAY STE 100 BEVERLY HILLS CA 90210 http://www.bizforum.org ARABIA ONLINE BOX 2853 BEVERLY HILLS CA 90213 http://www.arabia.com LOS ANGELES JEWISH EVENTS BOX 16002 BEVERLY HILLS CA 90209 http://www.laje.blogspot.com LOS ANGELES JEWISH EVENTS BOX 16002 BEVERLY HILLS CA 90209 http://www.laje.blogspot.com VALOR ENTERTAINMENT BOX 16539 BEVERLY HILLS CA 90209 http://www.almasri.com AMEN RA FILMS INCORPORATED 301 N CANON DR STE 228 BEVERLY HILLS CA 90210 http://www.alandfaraway.com FGM ENTERTAINMENT 301 N CANON DR STE 328 BEVERLY HILLS CA 90210 http://www.avenue-entertainment.com DOMAINATERIA 270 N CANON DR STE 1031 BEVERLY HILLS CA 90210 http://www.domainateria.com CHEVRON STATION 9378 WILSHIRE BLVD BEVERLY HILLS CA 90212 http://www.chevron.com
how come when i am using the \n it is just seperating the different variables with just a space, and not by a line?
for(int i = 0; i < list.Length; i++)
{
string name = list[i].GetName();
string address = list[i].GetAddress();
string city = list[i].GetCity();
string state = list[i].GetState();
string zip = list[i].getZip();
string url = list[i].getURL();
Response.Write(name);
Response.Write("\n");
Response.Write(address);
Response.Write("\n");
Response.Write(city);
Response.Write("\n");
Response.Write(state);
Response.Write("\n");
Response.Write(zip);
Response.Write("\n");
Response.Write(url);
Response.Write("\n");
i want the result to be this:
name
address
city, state zip
phone
name
address
city, state zip
phone
.........
but it is like this:
BUSINESS FORUM 9297 BURTON WAY STE 100 BEVERLY HILLS CA 90210 http://www.bizforum.org ARABIA ONLINE BOX 2853 BEVERLY HILLS CA 90213 http://www.arabia.com LOS ANGELES JEWISH EVENTS BOX 16002 BEVERLY HILLS CA 90209 http://www.laje.blogspot.com LOS ANGELES JEWISH EVENTS BOX 16002 BEVERLY HILLS CA 90209 http://www.laje.blogspot.com VALOR ENTERTAINMENT BOX 16539 BEVERLY HILLS CA 90209 http://www.almasri.com AMEN RA FILMS INCORPORATED 301 N CANON DR STE 228 BEVERLY HILLS CA 90210 http://www.alandfaraway.com FGM ENTERTAINMENT 301 N CANON DR STE 328 BEVERLY HILLS CA 90210 http://www.avenue-entertainment.com DOMAINATERIA 270 N CANON DR STE 1031 BEVERLY HILLS CA 90210 http://www.domainateria.com CHEVRON STATION 9378 WILSHIRE BLVD BEVERLY HILLS CA 90212 http://www.chevron.com
how come when i am using the \n it is just seperating the different variables with just a space, and not by a line?