Using CE´s TextChanged event

Last post 09-08-2004, 12:59 PM by KenA. 0 replies.
Sort Posts: Previous Next
  •  09-08-2004, 12:59 PM 1746

    Using CE´s TextChanged event

    Hi. I registered a custom btn and I´m getting its click event via CE´s TextChanged event. eg:

     

    System.Web.UI.WebControls.ImageButton btn1 = new System.Web.UI.WebControls.ImageButton();

    btn1.ImageUrl = "~/Images/btn1.gif";

    btn1.ID = "btn1";

    ce1.RegisterCustomButton(btn1);
     
    And
     

    private void ce1_TextChanged(object sender, System.EventArgs e)

    {

        //Editor ce1 = new Editor();

        //ce1 = (Editor)sender;

        //Response.Write( "<script language='JavaScript'>alert('ce1_TextChanged!');</script>" );

     
        // example: put code to save ce text here...

    }

     
    Now suppose I have an extra custom registered btn. eg:
     

    System.Web.UI.WebControls.ImageButton btn2 = new System.Web.UI.WebControls.ImageButton();

    btn2 .ImageUrl = "~/Images/btn1.gif";

    btn2 .ID = "btn2 ";

    ce1.RegisterCustomButton(btn2 );
     
    By clicking any of those 2 btns, all of then will be caught in the ce1_TextChanged event, so how can I differentiate which one was clicked?
     

    private void ce1_TextChanged(object sender, System.EventArgs e)

    {

        //Editor ce1 = new Editor();

        //ce1 = (Editor)sender;

     

        // btn1 or btn2 ???               

    }

     
     
     
     

    Regards,
    »»» KenA
View as RSS news feed in XML