Home
Manage Your Code
Snippet: Text line breakers for a string in textbox (C#)
Title: Text line breakers for a string in textbox Language: C#
Description: this helps to present a text with respective breaks in textbox. Views: 253
Author: Raghu k Date Added: 7/4/2008
Copy Code  
1 use--->("\r\n")
2==============
3Example
4note: (Text box should be set to multiline)
5------------------------------------------- 
6 StringBuilder sb = new StringBuilder();            
7 sb.Append("\r\n"); //---Breaks to Next line----

8 sb.Append(ds.Tables[0].Rows[2][3].ToString());
9 sb.Append("\r\n");
10 sb.Append("\r\n");
11 sb.Append(ds.Tables[0].Rows[3][5].ToString());
12 sb.Append("\r\n");
13 textbox1.Text= sb.ToString();