Hooking Post Back Event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yovi Oktofianus

    #1

    Hooking Post Back Event

    Hi all,

    is it posible to hook every post back event ?

    My goal is I want to know which control send post back event to my page
    before Page.OnLoad event raised. Or at least in Page_Load event handler i
    can find out which control raise it.

    Thank's


  • Kevin Spencer

    #2
    Re: Hooking Post Back Event

    If IsPostBack Then...

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

    Big Things are made up of
    Lots of Little Things.

    "Yovi Oktofianus" <yovio@hotmail. com> wrote in message
    news:eXDIDEJlDH A.3316@tk2msftn gp13.phx.gbl...[color=blue]
    > Hi all,
    >
    > is it posible to hook every post back event ?
    >
    > My goal is I want to know which control send post back event to my page
    > before Page.OnLoad event raised. Or at least in Page_Load event handler i
    > can find out which control raise it.
    >
    > Thank's
    >
    >[/color]


    Comment

    • Yovi Oktofianus

      #3
      Re: Hooking Post Back Event

      Yup, but, I cannot find out which control send post back event, with the
      method you suggest me I can only find out is page load event a Post Back
      Event or not.

      How can we know the control who send it (postback event) ?

      Thank's & Regards

      Yovi

      "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
      news:#micRXLlDH A.3688@TK2MSFTN GP11.phx.gbl...[color=blue]
      > If IsPostBack Then...
      >
      > --
      > HTH,
      >
      > Kevin Spencer
      > Microsoft MVP
      > .Net Developer
      > http://www.takempis.com
      > Big Things are made up of
      > Lots of Little Things.
      >
      > "Yovi Oktofianus" <yovio@hotmail. com> wrote in message
      > news:eXDIDEJlDH A.3316@tk2msftn gp13.phx.gbl...[color=green]
      > > Hi all,
      > >
      > > is it posible to hook every post back event ?
      > >
      > > My goal is I want to know which control send post back event to my page
      > > before Page.OnLoad event raised. Or at least in Page_Load event handler[/color][/color]
      i[color=blue][color=green]
      > > can find out which control raise it.
      > >
      > > Thank's
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • John Saunders

        #4
        Re: Hooking Post Back Event

        "Yovi Oktofianus" <yovio@hotmail. com> wrote in message
        news:u51zdqRlDH A.2500@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Yup, but, I cannot find out which control send post back event, with the
        > method you suggest me I can only find out is page load event a Post Back
        > Event or not.
        >
        > How can we know the control who send it (postback event) ?[/color]

        It's usually a bad idea to try to figure out which control caused the
        PostBack.

        Usually, people just handle the various Click or SelectedIndexCh anged
        events.
        --
        John Saunders
        Internet Engineer
        john.saunders@s urfcontrol.com


        Comment

        • Jalil Vaidya

          #5
          Re: Hooking Post Back Event

          Request.Form["__EVENTTAR GET"] will give the UniqueID of the control that
          caused the postback to fire. As this is an implementation detail of
          ASP.NET and is subject to change in future, it is usually a bad idea to
          play around with it. I would also like to point out that the UniqueID of
          a control can be different than the ID that you gave to the control.

          HTH,

          Jalil Vaidya

          Yovi Oktofianus wrote:[color=blue]
          > Hi all,
          >
          > is it posible to hook every post back event ?
          >
          > My goal is I want to know which control send post back event to my page
          > before Page.OnLoad event raised. Or at least in Page_Load event handler i
          > can find out which control raise it.
          >
          > Thank's
          >
          >[/color]

          Comment

          • Yovi Oktofianus

            #6
            Re: Hooking Post Back Event

            Yup, but, I cannot find out which control send post back event, with the
            method you suggest me I can only find out is page load event a Post Back
            Event or not.

            How can we know the control who send it (postback event) ?

            Thank's & Regards

            Yovi

            "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
            news:#micRXLlDH A.3688@TK2MSFTN GP11.phx.gbl...[color=blue]
            > If IsPostBack Then...
            >
            > --
            > HTH,
            >
            > Kevin Spencer
            > Microsoft MVP
            > .Net Developer
            > http://www.takempis.com
            > Big Things are made up of
            > Lots of Little Things.
            >
            > "Yovi Oktofianus" <yovio@hotmail. com> wrote in message
            > news:eXDIDEJlDH A.3316@tk2msftn gp13.phx.gbl...[color=green]
            > > Hi all,
            > >
            > > is it posible to hook every post back event ?
            > >
            > > My goal is I want to know which control send post back event to my page
            > > before Page.OnLoad event raised. Or at least in Page_Load event handler[/color][/color]
            i[color=blue][color=green]
            > > can find out which control raise it.
            > >
            > > Thank's
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • John Saunders

              #7
              Re: Hooking Post Back Event

              "Yovi Oktofianus" <yovio@hotmail. com> wrote in message
              news:u51zdqRlDH A.2500@TK2MSFTN GP10.phx.gbl...[color=blue]
              > Yup, but, I cannot find out which control send post back event, with the
              > method you suggest me I can only find out is page load event a Post Back
              > Event or not.
              >
              > How can we know the control who send it (postback event) ?[/color]

              It's usually a bad idea to try to figure out which control caused the
              PostBack.

              Usually, people just handle the various Click or SelectedIndexCh anged
              events.
              --
              John Saunders
              Internet Engineer
              john.saunders@s urfcontrol.com


              Comment

              • Jalil Vaidya

                #8
                Re: Hooking Post Back Event

                Request.Form["__EVENTTAR GET"] will give the UniqueID of the control that
                caused the postback to fire. As this is an implementation detail of
                ASP.NET and is subject to change in future, it is usually a bad idea to
                play around with it. I would also like to point out that the UniqueID of
                a control can be different than the ID that you gave to the control.

                HTH,

                Jalil Vaidya

                Yovi Oktofianus wrote:[color=blue]
                > Hi all,
                >
                > is it posible to hook every post back event ?
                >
                > My goal is I want to know which control send post back event to my page
                > before Page.OnLoad event raised. Or at least in Page_Load event handler i
                > can find out which control raise it.
                >
                > Thank's
                >
                >[/color]

                Comment

                Working...