1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to use delegate and event in userControl ?

Discussion in 'C#' started by beginner.nguyen, Jun 28, 2011.

  1. beginner.nguyen

    beginner.nguyen New Member

    Joined:
    Jun 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    I have create a userControl name is UserControl1. On this usercontrol, I create a button name is btnAdd. I create 2 form name are Form1 and Form2. And then I add UserControl1 on those form. I want to when I click btnAdd button on Form1 then show string "this is form 1", if I click btnAdd button on Form2 then show string "this is form 2".

    I want to use delegate and event to do that. Could you help me.
    Thank you very much. :cryin:
     

Share This Page