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. Advertisements

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. Darren Clark
    Replies:
    2
    Views:
    587
    Darren Clark
    Jun 25, 2004
  2. KK
    Replies:
    0
    Views:
    522
  3. Nathan Sokalski

    MouseUp/MouseDown events for ASP.NET ImageButton

    Nathan Sokalski, Feb 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,052
    Mikhail Arkhipov (Microsoft)
    Feb 9, 2005
  4. =?Utf-8?B?QnJ1Y2U=?=

    Dynamically created ImageButton with events

    =?Utf-8?B?QnJ1Y2U=?=, Apr 12, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    639
    =?Utf-8?B?QnJ1Y2U=?=
    Apr 12, 2005
  5. KK
    Replies:
    0
    Views:
    229
  6. Q Dennis

    UserControl - Doesn't fire child events

    Q Dennis, Sep 20, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    186
    Anthony Hunter
    Sep 20, 2004
  7. KK
    Replies:
    0
    Views:
    238
  8. Chris

    Events Events Events Please Help

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