please help me. I developed an windows application using C#.NET. I configured my database connection string
in app.config file. The problem is that I can retrieve data but cannot insert data into the database. 
My code is....

```
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        // TODO: This line of code loads data into the 'database1DataSet.student' table. You can move, or remove it, as needed.
        this.nameTableAdapter.Fill(this.database1DataSet.student);

    }

    private void button1_Click(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["mycon"].ConnectionString);

        con.Open();

        String str = "insert into student(Id,name,num) values(" + textBox1.Text + ",'" + textBox2.Text + "','" + textBox3.Text + "')";

        SqlCommand cmd = new SqlCommand(str, con);

        cmd.ExecuteNonQuery();
        con.Close();
        label1.Text = "Data has been successfully inserted";
    }
}

```

app. config file....

```
<connectionStrings>
        <add name="mycon"
            connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>

```