Check the below example. QueryString Parameter is Id using which I pass CustomerId which is matched with Northwind database Customers table
<asp:GridView ID="GridView1" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White"
RowStyle-BackColor="#A1DCF2" AlternatingRowStyle-BackColor="White" AlternatingRowStyle-ForeColor="#000"
runat="server" AutoGenerateColumns="false" DataSourceID = "SqlDataSource1">
<Columns>
<asp:BoundField DataField="ContactName" HeaderText="Contact Name" ItemStyle-Width="150px" />
<asp:BoundField DataField="City" HeaderText="City" ItemStyle-Width="100px" />
<asp:BoundField DataField="Country" HeaderText="Country" ItemStyle-Width="100px" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>"
SelectCommand="SELECT * FROM Customers WHERE CustomerId=@CustomerId">
<SelectParameters>
<asp:QueryStringParameter Name="CustomerId" QueryStringField="Id" />
</SelectParameters>
</asp:SqlDataSource>