get data by id in grid view
<p>I have a table with threads for a forum, the thread name is a link and once clicked it passes the thread_id to the comments page, I need to know how to then display all the comments with the thread_id that is passed?</p>

<p>Have tried:</p>

<pre><code>&lt;asp:SqlDataSource ID="CommentsDataSource" runat="server"
SelectCommand="select * from comments where thread_id=@thread_id" &gt;
&lt;SelectParameters&gt;
    &lt;asp:QueryStringParameter Name="@thread_id" QueryStringField="thread_id" Runat="Server" /&gt;
&lt;/SelectParameters&gt;
&lt;/asp:SqlDataSource&gt;

&lt;asp:GridView ID="GridView1" runat="server"&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField DataField="comment" HeaderText="Comment" /&gt;
    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>but it doesn't work</p>

<p>Thanks</p>
