Hi.
I am getting data with datareader and I want to show this data on every line. I try "\n,\n\n,\r\n" but I it didnt work. Its gettign only one row. How can i do that?
My codes are below,
while (rdr_gonderilecek.Read())
{
gonderilecek_data += rdr_gonderilecek["iletiler"].ToString()+"\n";
}
Writing to next line
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hiren SoniRank #694 · 3.5K reputationPosted Jan 3, 2010, 1:33 AM EST
Hiren SoniRank #694 · 3.5K reputationPosted Jan 3, 2010, 1:37 AM EST
yokzuRank #5,421 · 300 reputationPosted Jan 3, 2010, 7:16 AM EST
Thanks for your reply. Actually, it doesnt solve my problem. My all codes are are below,
public string gonderilecek_data = "";
...
while (rdr_gonderilecek.Read())
{
gonderilecek_data += rdr_gonderilecek["iletiler"].ToString()+"\n\n";
}
TcpClient tcp_client = new TcpClient(karsi_ip, 30001);
ag_akimi = tcp_client.GetStream();
akim_yazici = new StreamWriter(ag_akimi);
akim_yazici.WriteLine(gonderilecek_data);
akim_yazici.Flush();
Kirtan PatelRank #292 · 8.6K reputationPosted Jan 3, 2010, 1:04 PM EST
public string gonderilecek_data = "";
at the top of all code in class this can cause problem . if you put or declare it before method that executed by thread ..