How do i get text to move to a new line? Ithought it was \ . However that doesn\
ID: 3770497 • Letter: H
Question
How do i get text to move to a new line? Ithought it was . However that doesn't seem to work.
I have two pieces of code that write to the same textbox
the first is after an update statement and it writes to the text with the following
txtSample.Text = ("Total records... " + count + " ");
the other is
foreach (DataRow row in ds.Tables[0].Rows)
{
for (int i = 0; i < ds.Tables[0].Columns.Count; i++)
txtSample.Text += " " +row[i].ToString() + " ";
txtSample.Text += " ";
}
conn.Close();
when i run the code the text box will show:
Total records... (somenumber) record1
record2
record3 etc...
instead of:
Total records... (somenumber)
record1
record2
record3 etc..
How can I get this to display properly?
Explanation / Answer
Plese check this
txtSample.Text = ("Total records... " + count + " ");
the other is
foreach (DataRow row in ds.Tables[0].Rows)
{
for (int i = 0; i < ds.Tables[0].Columns.Count; i++)
txtSample.Text += " " +row[i].ToString() + " ";
txtSample.Text += " ";
}
conn.Close();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.