468,760 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,760 developers. It's quick & easy.

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
Nov 17 '05 #1
7 1368
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" <yo***@hotmail.com> wrote in message
news:eX**************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#m**************@TK2MSFTNGP11.phx.gbl...
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" <yo***@hotmail.com> wrote in message
news:eX**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #3
"Yovi Oktofianus" <yo***@hotmail.com> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
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) ?


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

Usually, people just handle the various Click or SelectedIndexChanged
events.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #4
Request.Form["__EVENTTARGET"] 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:
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


Nov 17 '05 #5
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#m**************@TK2MSFTNGP11.phx.gbl...
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" <yo***@hotmail.com> wrote in message
news:eX**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #6
"Yovi Oktofianus" <yo***@hotmail.com> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
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) ?


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

Usually, people just handle the various Click or SelectedIndexChanged
events.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #7
Request.Form["__EVENTTARGET"] 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:
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


Nov 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

79 posts views Thread by pinkfloydhomer | last post: by
3 posts views Thread by Rick Strahl [MVP] | last post: by
reply views Thread by Carl Clawson | last post: by
6 posts views Thread by guoqi zheng | last post: by
8 posts views Thread by pigeonrandle | last post: by
7 posts views Thread by nick.fletcher | last post: by
1 post views Thread by Sean | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.