How to play selected combobox item in webbrowser component in c# windows forms?
<p>I have a few flash files listed in my combobox component of my WinForms application. Now if file is selected I want it to be played in webBrowser component, here is the code:</p>

<p>Adding files into combobox:</p>

<pre><code>   private void Form1_Load(object sender, EventArgs e)
    {
        string[] filePaths = Directory.GetFiles(@"c:\folder\");

          foreach (string s in filePaths)
        {
            comboBox1.Items.Add(s);
        } 
    }
</code></pre>

<p>Playing flash file:</p>

<pre><code>    private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.webBrowser1.Navigate(comboBox1.SelectedText); //it doesnt work
    }
</code></pre>

<p>I can open flash files normally, it looks like I can't pass the selected value from combobox.</p>

<p><strong>UPDATE</strong></p>

<p>To make sure that this event is working, I changed it into:</p>

<pre><code>private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
        this.textBox1.Text = "adsfadsf";
        this.textBox2.Text = comboBox1.SelectedText;
}
</code></pre>

<p>When I change the selected item, string adsfadsf appears in textBox1, but textBox2 stays empty.</p>

<p><strong>UPDATE2</strong> </p>

<p><strong>Here is the full code:</strong></p>

<pre><code>using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace App1
{
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        string[] filePaths = Directory.GetFiles(@"c:\folder\");

        foreach (string s in filePaths)
        {
            comboBox1.Items.Add(s);
        } 
    }

    private void label1_Click(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {

    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }


    private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.textBox2.Text = "adsfadsf";
        this.textBox1.Text = comboBox1.SelectedText;
       // this.webBrowser1.Navigate(comboBox1.SelectedText);
    }

    private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
    {

    }

    private void textBox2_TextChanged(object sender, EventArgs e)
    {

    }

}
</code></pre>

<p>}</p>
