Exec function from user control..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Wells

    Exec function from user control..

    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@F irstByte.net


  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Exec function from user control..

    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@F irstByte.net
    >
    >
    >

    Comment

    • =?Utf-8?B?TWFuaXNo?=

      #3
      RE: Exec function from user control..

      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.

                "What is delegate?" we all have faced this question in one or more interview. :) and the most common answer is "Function pointer"....


      Regards,
      Manish
      MESCIUS USA Inc. has JavaScript and .NET UI controls, datagrids, reporting solutions, spreadsheets, document APIs and more to take your applications further.



      "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@F irstByte.net

      Comment

      • Matthew Wells

        #4
        Re: Exec function from user control..

        Thanks. It looks complicated, but I'll give it a try.

        "Manish" <Manish@discuss ions.microsoft. comwrote in message
        news:73E4E6EB-B9CD-42CD-A4BC-00FDB853D8DD@mi crosoft.com...
        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.
        >
                  "What is delegate?" we all have faced this question in one or more interview. :) and the most common answer is "Function pointer"....

        >
        Regards,
        Manish
        MESCIUS USA Inc. has JavaScript and .NET UI controls, datagrids, reporting solutions, spreadsheets, document APIs and more to take your applications further.

        >
        >
        "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@F irstByte.net
        >
        >
        >

        Comment

        Working...