event handler not firing for dataList edit item

Discussion in 'ASP .Net' started by Wee Bubba, May 24, 2004.

  1. Wee Bubba

    Wee Bubba Guest

    if you put a row of my dataList into edit mode there is a button. I am
    trying to attach to an existing event handler like this (C#):

    public void EditRowHandler (Object src, DataListCommandEventArgs e)
    {
    ...
    Button myBtnt = (Button)
    dl1.Items[e.Item.ItemIndex].FindControl("btnSMEdit");

    myBtn.Click += new EventHandler(btnSearch_Click);
    }

    i know the code has successfully captured my button because I can
    alter the button's Text property OK. also from debugging I know my
    event handler is not even being called for some reason.

    why is my button not calling the event handler?


    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
     
    Wee Bubba, May 24, 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. jespey
    Replies:
    0
    Views:
    555
    jespey
    Nov 12, 2003
  2. Replies:
    4
    Views:
    8,139
    ajaimisra
    Aug 4, 2006
  3. Tom Perkin

    Event handler not firing

    Tom Perkin, Dec 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    414
    Tom Perkin
    Dec 2, 2005
  4. TS
    Replies:
    4
    Views:
    11,781
    Steven Cheng[MSFT]
    Aug 22, 2006
  5. Replies:
    1
    Views:
    752
    Damien
    Feb 22, 2007
Loading...

Share This Page