raising a Click or Command event on an ImageButton click control

Discussion in 'ASP .Net Web Controls' started by James Tsao, Oct 25, 2004.

  1. James Tsao

    James Tsao Guest

    I've created a Custom UserControl that get's passed a handle to an
    ImageButton Control.

    Can I raise a Click or Command event on the ImageButton from my
    UserControl?

    //--- Begin Parent Page ---
    public class MyPage: System.Web.UI.Page
    {
    protected ImageButton PictureFolderExplorerOpen;
    private MyControl myControl;

    private void Page_Load(object sender, System.EventArgs e)
    {
    myControl.ClickImage = PictureFolderExplorerOpen;
    }
    }
    //--- End Parent Page ---


    //--- Begin UserControl ---
    public class MyControl : System.Web.UI.UserControl
    {
    public ImageButton ClickImage;

    private void Page_Load(object sender, System.EventArgs e)
    {
    // FIRE Click/Command EVENT of ClickImage
    }
    }
    //--- End UserControl ---
     
    James Tsao, Oct 25, 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. Jitu
    Replies:
    0
    Views:
    393
  2. Benjamin Gavin
    Replies:
    3
    Views:
    541
    Alex Homer
    Sep 28, 2004
  3. Mick
    Replies:
    0
    Views:
    391
  4. msnews.microsoft.com
    Replies:
    6
    Views:
    3,282
    msnews.microsoft.com
    Apr 28, 2005
  5. Guest

    Raising a click event

    Guest, Feb 10, 2006, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    191
    Guest
    Feb 10, 2006
Loading...

Share This Page