title: sql update method not updating or deleting
body: <p>I am developing a site and have a GridView with a select button the shows a DetailsView when clicked.  When I try to change the data in the details view with the update command or remove the record with the update command, nothing happens.  I don't understand why this is not updating or deleting the record.  Here's the code:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="OverwriteChanges"
      ConnectionString="Data Source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"  
      DeleteCommand="DELETE FROM [aspnet_Membership] WHERE [UserName] =@original_UserName AND [FirstName]= @original_FirstName AND [LastName]= @original_LastName"
      OldValuesParameterFormatString="original_{0}"
      SelectCommand="SELECT * FROM [aspnet_Membership]" 
  
      UpdateCommand="UPDATE [aspnet_Membership] SET [FirstName] = @FirstName, [LastName] = @LastName, [Company] = @Company, [PartsList] = @PartsList, 
                    [UserName] = @UserName, [PasswordQuestion] = @PasswordQuestion, [PasswordAnswer] = @PasswordAnswer, [Role] = @Role, [Comment] =@Comment
                    WHERE [FirstName] = @original_FirstName AND [LastName] = @original_LastName AND [Company] = @original_Company AND 
                    [PartsList] = @original_PartsList AND [UserName] = @original_UserName AND [PasswordQuestion] = @original_PasswordQuestion AND 
                    [PasswordAnswer] = @original_PasswordAnswer AND [Role] = @original_Role AND [Comment] =@original_Comment"&gt;
         &lt;UpdateParameters&gt;
              &lt;asp:Parameter Name="FirstName" Type="String" /&gt;
              &lt;asp:Parameter Name="LastName" Type="String" /&gt;
              &lt;asp:Parameter Name="Company" Type="String" /&gt;
              &lt;asp:Parameter Name="PartsList" Type="String" /&gt;
              &lt;asp:Parameter Name="UserName" Type="String" /&gt;
              &lt;asp:Parameter Name="Password" Type="String" /&gt;
              &lt;asp:Parameter Name="Email" Type="String" /&gt;
              &lt;asp:Parameter Name="PasswordQueston" Type="String" /&gt;
              &lt;asp:Parameter Name="PasswordAnswer" Type="String" /&gt;
              &lt;asp:Parameter Name="Role" Type="String" /&gt;
              &lt;asp:Parameter Name="Comment" Type="String" /&gt;
              &lt;asp:Parameter Name="original_FirstName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_LastName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Company" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PartsList" Type="String" /&gt;
              &lt;asp:Parameter Name="original_UserName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Password" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Email" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PasswordQuestion" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PasswordAnswer" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Role" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Comment" Type="String" /&gt;
         &lt;/UpdateParameters&gt;   
         &lt;DeleteParameters&gt;
              &lt;asp:Parameter Name="original_FirstName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_LastName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Company" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PartsList" Type="String" /&gt;
              &lt;asp:Parameter Name="original_UserName" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Password" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Email" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PasswordQuestion" Type="String" /&gt;
              &lt;asp:Parameter Name="original_PasswordAnswer" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Role" Type="String" /&gt;
              &lt;asp:Parameter Name="original_Comment" Type="String" /&gt;
      &lt;/DeleteParameters&gt;      
  &lt;/asp:SqlDataSource&gt; 
  </code></pre>
  
  <p><strong>EDIT</strong> GridView1 code:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
          DataSourceID="SqlDataSource1" AllowPaging="True" 
          AllowSorting="True" DataKeyNames="UserId" Caption="Select User" 
          onselectedindexchanged="GridView1_SelectedIndexChanged" 
          ToolTip="Select a user to view details about the selected user"&gt;
          &lt;Columns&gt;
              &lt;asp:CommandField ShowSelectButton="True" /&gt;
              &lt;asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" /&gt;
              &lt;asp:BoundField DataField="LastName" HeaderText="Last Name" 
                  SortExpression="LastName" /&gt;
              &lt;asp:BoundField DataField="FirstName" HeaderText="First Name" 
                  SortExpression="FirstName" /&gt;
              &lt;asp:BoundField DataField="UserName" HeaderText="User Name" 
                  SortExpression="UserName" /&gt;
              &lt;asp:BoundField DataField="Company" HeaderText="Company" 
                  SortExpression="Company" /&gt;
              &lt;asp:BoundField DataField="PartsList" HeaderText="Parts List" 
                  SortExpression="PartsList" /&gt;
              &lt;asp:BoundField DataField="Role" HeaderText="Role" SortExpression="Role" /&gt;
          &lt;/Columns&gt;
          &lt;SelectedRowStyle BackColor = "Yellow" /&gt;
      &lt;/asp:GridView&gt;       
  </code></pre>