title: How to Make A SQL Data Source Delete Statement Delete Selected Item
body: <p>I am trying to delete the selected item on a grid view from a sql server database.
  I have my DataKeyNames set and a sql data source with the grid view pointing to it. I have a delete command:</p>
  
  <pre><code>DeleteCommand="DELETE FROM cartsigns WHERE SignName = @SignName" 
  </code></pre>
  
  <p>And A select command:</p>
  
  <pre><code>SelectCommand="SELECT * FROM cartsigns WHERE ((ipaddress = @ipaddress) AND (ipaddress = @ipaddress2))" 
  </code></pre>
  
  <p>I then have my delete paramerter:</p>
  
  <pre><code>    &lt;DeleteParameters&gt;
           &lt;asp:ControlParameter 
              ControlID="GridView1" 
              Name="SignName" 
              PropertyName="SelectedDataKey" /&gt;
      &lt;/DeleteParameters&gt;
  </code></pre>
  
  <p>But when I select a item and push the delete button it does not delete.
  Thanks for your help.</p>
  
  <p>p.s. The purpose for this is a shopping cart and I want to be able to delete items in my cart.  </p>
  
  <p>Please Please Help</p>