Cathie said:
Hi All,
I have a few user controls on a page and I need to determine which control
caused the PostBack. Is there anyway to do this?
First of all, user controls don't usually cause post backs. Usually it's
controls in the user control which cause postbacks.
Second, you may want to review your reasons for wanting to know which
control caused the postback. In most cases this sort of thing is better done
simply by handling the control's postback event (Click for Buttons,
SelectedIndexChanged for a DropDownList, etc).
The one exception to this (I've been taught here) is when you are using a
control mostly for its value. For instance, if you have an AutoPostBack
DropDownList and need to use the new value to set parameters for a query in
Page_Load.