Create a UserControl.ascx File

Discussion in 'ASP .Net' started by Greg, Oct 27, 2009.

  1. Greg

    Greg Guest

    I've been developing in C# ASP.NET for about 18 months now and am always
    looking to expand my skills. Right now I'm looking into using my own User
    Controls. I know how I can create one and add it a web page, but where I'm
    having difficutly is Events, such as a Button_Click() event.

    I've had luck with the properties and being able to set values in my the
    User Controls, but from the samples I've been finding on the web I haven't
    really come across one that explains how I can fire a Button Event (with my
    own logic) from my Hosting Page.

    Can anyone explain how I can call a btnButton_Click() event from my hosting
    page?

    Thanks in advance.

    Greg
    Greg, Oct 27, 2009
    #1
    1. Advertising

  2. I guess this should work
    http://odetocode.com/Articles/94.aspx

    Regards,

    Trevor Benedict

    "Greg" <> wrote in message
    news:...
    > I've been developing in C# ASP.NET for about 18 months now and am always
    > looking to expand my skills. Right now I'm looking into using my own User
    > Controls. I know how I can create one and add it a web page, but where I'm
    > having difficutly is Events, such as a Button_Click() event.
    >
    > I've had luck with the properties and being able to set values in my the
    > User Controls, but from the samples I've been finding on the web I haven't
    > really come across one that explains how I can fire a Button Event (with
    > my
    > own logic) from my Hosting Page.
    >
    > Can anyone explain how I can call a btnButton_Click() event from my
    > hosting
    > page?
    >
    > Thanks in advance.
    >
    > Greg
    Trevor Benedict, Oct 27, 2009
    #2
    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. Quentin
    Replies:
    1
    Views:
    476
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    474
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,930
    Holger (David) Wagner
    Jul 3, 2004
  4. Jiri Zidek
    Replies:
    4
    Views:
    220
    Steven Cheng[MSFT]
    Dec 6, 2004
  5. Replies:
    2
    Views:
    525
Loading...

Share This Page