open and save file dialog
<p>i use an openFileDialog to read from a text file and print the values in a listbox and a saveFileDialog to save the changes in textfile.i wrote this code but it doesn't work.if a change the listbox with a textbox works fine.But i need to print and save the items into a listbox.any suggestions?</p>

<pre><code>    private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
    {

    }

    private void button4_Click(object sender, EventArgs e)
    {
        if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {

            label7.Text = openFileDialog1.FileName;
            listBox1.Text = File.ReadAllText(label7.Text);

        }
    }

    private void button5_Click(object sender, EventArgs e)
    {
        if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {

            File.WriteAllText(saveFileDialog1.FileName, listBox1.Text);
        }

    }
</code></pre>
