ImageButton doesn't handle events in a UserControl?

Discussion in 'ASP .Net Web Controls' started by SyntaxError, Jan 9, 2004.

  1. SyntaxError

    SyntaxError Guest

    I'm unable to get a ImageButton placed in a custom user control to handle the OnCommand event.. but, when the exact same code is placed in the webform.. it works perfectly?

    An example of what I'm trying to do:

    <asp:imageButton imageUrl="~/images/sortLeft.gif" onCommand="sortBulletins" alternateText="sort ascending" commandArgument="memberEmail ASC" runat="server" ID="Imagebutton3" />

    When the user clicks on the ImageButton, it postbacks to a procedure "sortBulletins" in the code behind:
    Sub sortBulletins(ByVal sender As Object, ByVal e As CommandEventArgs)

    'viewState("sortField") = e.CommandArgument

    End Sub

    Any help or ideas would be greatful!
    Thanks,
    Robbie
    SyntaxError, Jan 9, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KK
    Replies:
    0
    Views:
    430
  2. KK
    Replies:
    0
    Views:
    148
  3. Q Dennis

    UserControl - Doesn't fire child events

    Q Dennis, Sep 20, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    105
    Anthony Hunter
    Sep 20, 2004
  4. KK
    Replies:
    0
    Views:
    123
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    340
    Chris
    Aug 30, 2005
Loading...

Share This Page