how do I loop through, line by line, the contexts from a textarea in asp.net?
streamreader and stream both don't accept a string.
how do I loop through, line by line, the contexts from a textarea in asp.net?
streamreader and stream both don't accept a string.
You would need to split the text in the TextBox
control into lines yourself:
var textLines = myTextbox.Text.Split('\n');
foreach( var line in textLines )
// your code...
you need to split the TextBox Text into your array and loop through it
txtArea.Text.Split('\n');
in .Net 3.5 or above
var s = txtArea.Text.Split('\n');
Array.ForEach(s, r => YourLoop(r));