471,082 Members | 915 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

Determining the PostBack event caller?

I am wondering if it is at all possible to ascertain what cause the PostBack
event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?
Nov 18 '05 #1
3 1844
The "Sender" event argument represents the object that fired the even. You
can use sender.getType.toString to determine what type of control cause the
postback, then you can cast sender into that type and then you could check
its name.
"Wayne" <none@none> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #2
Where to do you want to find out the object that caused the postback?

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Wayne" <none@none> wrote in message
news:#$**************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #3
If all else fails, sometimes you can use
request.form("__EVENTTARGET")

"Wayne" <none@none> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Abrahams | last post: by
66 posts views Thread by Darren Dale | last post: by
3 posts views Thread by James Dunkerley | last post: by
5 posts views Thread by Matthew Louden | last post: by
7 posts views Thread by Michael D. Ober | last post: by
11 posts views Thread by antonyliu2002 | last post: by
2 posts views Thread by John Kotuby | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.