Exec function from user control..

Discussion in 'ASP .Net' started by Matthew Wells, Feb 7, 2008.

  1. Hello,

    I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
    it. I want to execute a function on the main form's code behind page from
    the click event of the user control button. How do I do that?

    Thanks.

    Matthew Wells
     
    Matthew Wells, Feb 7, 2008
    #1
    1. Advertising

  2. Matthew Wells

    bruce barker Guest

    the user control could expose an event, or expose the button as a property to
    the main form

    -- bruce (sqlwork.com)


    "Matthew Wells" wrote:

    > Hello,
    >
    > I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
    > it. I want to execute a function on the main form's code behind page from
    > the click event of the user control button. How do I do that?
    >
    > Thanks.
    >
    > Matthew Wells
    >
    >
    >
    >
     
    bruce barker, Feb 7, 2008
    #2
    1. Advertising

  3. Matthew Wells

    Manish Guest

    Hi Mathews,

    you can use delegate to raise event of the child control in the Main page.
    Please refer to the link below to do this.

    http://chiragrdarji.blogspot.com/2007/08/raise-event-from-user-control-to-main.html

    Regards,
    Manish
    www.ComponentOne.com


    "bruce barker" wrote:

    > the user control could expose an event, or expose the button as a property to
    > the main form
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Matthew Wells" wrote:
    >
    > > Hello,
    > >
    > > I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
    > > it. I want to execute a function on the main form's code behind page from
    > > the click event of the user control button. How do I do that?
    > >
    > > Thanks.
    > >
    > > Matthew Wells
    > >
    > >
    > >
    > >
     
    Manish, Feb 7, 2008
    #3
  4. Thanks. It looks complicated, but I'll give it a try.

    "Manish" <> wrote in message
    news:...
    > Hi Mathews,
    >
    > you can use delegate to raise event of the child control in the Main page.
    > Please refer to the link below to do this.
    >
    > http://chiragrdarji.blogspot.com/2007/08/raise-event-from-user-control-to-main.html
    >
    > Regards,
    > Manish
    > www.ComponentOne.com
    >
    >
    > "bruce barker" wrote:
    >
    >> the user control could expose an event, or expose the button as a
    >> property to
    >> the main form
    >>
    >> -- bruce (sqlwork.com)
    >>
    >>
    >> "Matthew Wells" wrote:
    >>
    >> > Hello,
    >> >
    >> > I'm using ASP.net 2.0 with C#. I have a user control with 4
    >> > buttons on
    >> > it. I want to execute a function on the main form's code behind page
    >> > from
    >> > the click event of the user control button. How do I do that?
    >> >
    >> > Thanks.
    >> >
    >> > Matthew Wells
    >> >
    >> >
    >> >
    >> >
     
    Matthew Wells, Feb 8, 2008
    #4
    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. Hal Vaughan
    Replies:
    11
    Views:
    1,123
    Gordon Beaton
    May 22, 2006
  2. tedsuzman
    Replies:
    2
    Views:
    7,094
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  3. Ted
    Replies:
    1
    Views:
    470
    Duncan Booth
    Jul 22, 2004
  4. Guillermo Riojas
    Replies:
    0
    Views:
    172
    Guillermo Riojas
    Nov 26, 2010
  5. Random Task
    Replies:
    12
    Views:
    654
    Joe Smith
    Dec 4, 2005
Loading...

Share This Page