ImageButton does not trigger Repeater.ItemCommand event

Discussion in 'ASP .Net Web Controls' started by Nathan Sokalski, Nov 15, 2007.

  1. I have an ImageButton inside a Repeater control. However, the ImageButton
    does not trigger the Repeater's ItemCommand event. For the moment, I am
    nesting an Image control inside a LinkButton, which works, but requires more
    work and 2 controls. I believe the reason for this is that the ImageButton
    renders an <input type="image"/> while the LinkButton renders an <a></a>
    tag. Any ideas?
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Nov 15, 2007
    #1
    1. Advertising

  2. Nathan Sokalski

    keithrull Guest

    On Nov 15, 12:47 pm, "Nathan Sokalski" <> wrote:
    > I have an ImageButton inside a Repeater control. However, the ImageButton
    > does not trigger the Repeater's ItemCommand event. For the moment, I am
    > nesting an Image control inside a LinkButton, which works, but requires more
    > work and 2 controls. I believe the reason for this is that the ImageButton
    > renders an <input type="image"/> while the LinkButton renders an <a></a>
    > tag. Any ideas?
    > --
    > Nathan Sokalski
    > ://www.nathansokalski.com/


    Is the ItemCommand event defined in your Repeater. I have tried to
    simulate your problem but it works everytime i run it.

    --
    Keith Rull
    http://www.keithrull.com/
    http://www.devpinoy.org/
     
    keithrull, Nov 15, 2007
    #2
    1. Advertising

  3. What is being rendered by Repeater? I believe that depending on what some of
    the other controls on the webform are it does work in some scenarios, but
    not others. If this is the case, I am not sure what causes it to render one
    way or the other.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "keithrull" <> wrote in message
    news:...
    > On Nov 15, 12:47 pm, "Nathan Sokalski" <> wrote:
    >> I have an ImageButton inside a Repeater control. However, the ImageButton
    >> does not trigger the Repeater's ItemCommand event. For the moment, I am
    >> nesting an Image control inside a LinkButton, which works, but requires
    >> more
    >> work and 2 controls. I believe the reason for this is that the
    >> ImageButton
    >> renders an <input type="image"/> while the LinkButton renders an <a></a>
    >> tag. Any ideas?
    >> --
    >> Nathan Sokalski
    >> ://www.nathansokalski.com/

    >
    > Is the ItemCommand event defined in your Repeater. I have tried to
    > simulate your problem but it works everytime i run it.
    >
    > --
    > Keith Rull
    > http://www.keithrull.com/
    > http://www.devpinoy.org/
     
    Nathan Sokalski, Nov 17, 2007
    #3
    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. Patrik Persson
    Replies:
    0
    Views:
    3,389
    Patrik Persson
    Aug 30, 2004
  2. =?Utf-8?B?Sm9lbCBEYW5pZWxz?=

    Cannot access data row in Repeater ItemCommand event

    =?Utf-8?B?Sm9lbCBEYW5pZWxz?=, Dec 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,920
    =?Utf-8?B?Sm9lbCBEYW5pZWxz?=
    Dec 13, 2004
  3. Nathan Sokalski
    Replies:
    2
    Views:
    1,044
    Nathan Sokalski
    Nov 17, 2007
  4. John

    ImageButton not firing ItemCommand event for the datagrid

    John, Aug 4, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    306
  5. Krushna

    Repeater ItemCommand does not fire the first time

    Krushna, Jul 29, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    189
    Krushna
    Jul 29, 2005
Loading...

Share This Page