I\'m using A Fast CSV Reader to parse some pasted text into a webpage. The Fast CSV reader requires a TextReader object, and all I have is a string. What\'s the best way to
StringReader is a TextReader (StreamReader is too, but for reading from streams). So taking your first example and just using it to construct the CsvReader rather than trying to construct a StreamReader from it first gives:
TextReader sr = new StringReader(TextBox_StartData.Text);
using(CsvReader csv = new CsvReader(sr, true))
{
DetailsView1.DataSource = csv;
DetailsView1.DataBind();
}