Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get multiple paragraphs

Status
Not open for further replies.

NMDUC

Programmer
Mar 4, 2006
61
VN
I want to build a control that looks like a editor but I don't need many editor's features. In this control, user can input in a textbox with multiple paragraphs. And I want to get what user typed there. If I use a ASP.NET's textbox, I get a string, not the multiple paragraphs. Please help me to solve it. Thank in advance.
 
I have found a solution for it. The textbox mode is multiple lines. And I use Split method to get lines. Here is the code.

string[] abc = TextBox1.Text.Split('\n');
string a = "";
for (int i = 0; i < abc.Length; i++)
{
a += abc;
a += "\n";
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top