Access Line By Line Data from a Multi lined TextBox

Here I place the code to access line by line from a multiline textbox which is entered by user.


protected void Button1_Click(object sender, EventArgs e)
{
string[] str = TextBox1.Text.Split('\r');
for (int i = 0; i < str.Length; i++)
str[i]=str[i].Replace("\n", "");
}


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: