gridview Binddata
<p>I'm working with a nested grid view. The second one should be bound by using a stored procedure. The parameter for the stored procedure is <code>gridview1.selected</code> value and the connection string should be taken from config.connection string. My code is:</p>

<pre><code>SqlCommand cmd = 
    new SqlCommand("spname", new SqlConnection(Config.connectionstring));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("parametername", GridView1.SelectedValue);
cmd.Connection.Open();
control.DataSource = cmd.ExecuteReader();
control.DataBind();
</code></pre>

<p>But it doesn't work. Any ideas, please?</p>
