title: Button control not firing
body: <p>The problem im having is a little complicated to explain, so please bear with me. I have 2 button controls. In the page load, I wanted to know what button created a postback on the page load. Through research I have found this snippet below and it works as expected. So here is my scenario of events that occur when click on the button.</p>
  
  <pre><code>   1. Click the button does a postback
     2. Runs the function below and tell me the id of the button
     3. Runs the clicked event handlers for that button
  
       Protected Sub btnCalc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles  btnCalc.Click
            ' Do this
       End Sub
  </code></pre>
  
  <p>The problem comes in when I click the second button, it does steps 1 and 2 but NEVER DOES 3. Through testing, I have that it only does 1, 2, and 3 on the first button clicked. I have no clue why this is happening?</p>
  
  <pre><code>     Function GetPostBackControlName() As String
  
        Dim control As Control = Nothing
        Dim ctrlname As String = Page.Request.Params("__EVENTTARGET")
  
      If ctrlname &lt;&gt; Nothing AndAlso ctrlname &lt;&gt; [String].Empty Then
          control = Page.FindControl(ctrlname)
      Else
          Dim ctrlStr As String = [String].Empty
          Dim c As Control = Nothing
  
          For Each ctl As String In Page.Request.Form
  
              c = Page.FindControl(ctl) 
  
             If TypeOf c Is System.Web.UI.WebControls.Button Then
                  control = c
                  Exit For
             End If
  
          Next
  
      End If
  
      Try
          Return control.ID.ToString
      Catch
          Return ""
      End Try
  
      End Function
  </code></pre>