if you only the text of the listview content should be written to a file you
can use something like this:
StringBuilder listViewContent = new StringBuilder();
foreach (ListViewItem item in this.listViewControl.Items)
{
listViewContent.Append(item.Text);
listViewContent.Append(Environment.NewLine);
}
TextWriter tw = new StreamWriter("C:\\ListViewContent.txt");
tw.WriteLine(listViewContent.ToString());
tw.Close();
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.