title: CommandArgument on SQLDatasource Inserted?
body: <p>I'm wishing to redirect to two different pages depending on which button is pressed on my form.</p>
  
  <p>Both buttons call the Insert method of the Datasource, but only one of them needs to get hold of the newly inserted GUID and redirect using that GUID.</p>
  
  <p>I'm doing it using this code</p>
  
  <pre><code>Protected Sub DSCustomers_Inserted(sender As Object, e As SqlDataSourceStatusEventArgs) Handles DSCustomers.Inserted
          Response.Redirect("~/addTicket.aspx?step=2&amp;customerID=" &amp; e.Command.Parameters("@customerID").Value.ToString)
  End Sub
  </code></pre>
  
  <p>But how can I know if it's the other button that has been pressed and doesn't need to redirect?</p>
  
  <p>I can't get access to the CommandArgument otherwise I would just check which button has been pressed using that and then redirect accordingly.</p>
  
  <p>Thanks</p>