button has to be clicked twice for method to be called

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mattyricho
    New Member
    • Oct 2006
    • 3

    button has to be clicked twice for method to be called

    Hi,

    Having some touble with one of my buttons - EmptyCartBtn. When the button is clicked it appears as if nothing happens, but when it is clicked the second time, the associated method is called.

    When i debug it, it looks as if it should work the first time around (ie it reaches the associated method) but in practice it doesnt.

    In a nut shell, i have a sub routine EmptyCartBtn.cl ick that calls a method in another code file. While it works, you have to click the button twice for it to work.

    Very weird. Any ideas? Any help Much Appreciated!

    Cheers
    Matt
  • polygonVB
    New Member
    • Sep 2006
    • 15

    #2
    Make sure that your function/sub procedure handles BUTTONNAME.Clic k

    i.e.
    Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
    'Do some stuff here
    End Sub

    Comment

    • Metalzed
      New Member
      • Sep 2006
      • 27

      #3
      It could be that the site have to update before you see the changes.

      test to click one time the refresh the site.

      Comment

      Working...