Buttons not "hearing" the clicks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K Viltersten

    Buttons not "hearing" the clicks

    The following works fine doing exactly what is supposed.

    <asp:LinkButt on
    id="id" runat="server" Text="Text">
    </asp:LinkButton>

    If i change it to the following, the callback method doesn't do what it
    should. In fact, as far i can see, it's not even called since the break
    point doesn't kick in!

    <asp:Button
    id="id" runat="server" Text="Text">
    </asp:Button>

    Where can i have missed something?

    --
    Regards
    Konrad Viltersten
  • Mark Rae [MVP]

    #2
    Re: Buttons not &quot;hearing&q uot; the clicks

    "K Viltersten" <tmp1@vilterste n.comwrote in message
    news:op.ua7d6x0 ui74t80@lp028.p agero.local...
    <asp:Button
    id="id" runat="server" Text="Text">
    </asp:Button>
    Where can i have missed something?
    Unless I'm losing my mind, you haven't wired up a server-side event e.g.
    OnClick="..."

    Also, as a matter of good naming practice, don't give a control and id of
    "id"...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • David Wier

      #3
      Re: Buttons not &quot;hearing&q uot; the clicks

      There are two ways to get the event working - if you're using VWD, click on
      the linkbutton - in the properties window, choose events - then, in the
      Click Event, assign the event handler you need

      Or - you can also do it the way Mark mentioned

      David Wier

      http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
      bloated markup


      "K Viltersten" <tmp1@vilterste n.comwrote in message
      news:op.ua7d6x0 ui74t80@lp028.p agero.local...
      The following works fine doing exactly what is supposed.

      <asp:LinkButt on
      id="id" runat="server" Text="Text">
      </asp:LinkButton>

      If i change it to the following, the callback method doesn't do what it
      should. In fact, as far i can see, it's not even called since the break
      point doesn't kick in!

      <asp:Button
      id="id" runat="server" Text="Text">
      </asp:Button>

      Where can i have missed something?

      --
      Regards
      Konrad Viltersten


      Comment

      Working...