D
Dan
Hi,
I'd like to find out the control that caused a postback to be raised. Obviously this could simply done in a control event handler. I am not going to do this method and would like no references as to how to do it this way as I already know how.
I know this may be getting into advanced or unheard of territory.
I have some custom web user controls that are dynamically created at run time along with other controls. I can still add an event handler to these controls, but unfortunately the event handler wont fire until the controls are re-created on the postback, but I don't want the start-up code running on a post back, I need it to run in the event of the control that cuased the post back. This works fine for my other controls on the form that arn't generated, but will not for this user control, so I need an alternative.
I need some indication in my page_load (or init) event that tells me that our user control has initiated the postback and to then run start up code.
Are there any techniques out there that allow me to dig into the postback and discover what control or control type made the postback?
Another solution I could add a client side handler that could set the value of a checkbox but due to the complexity of the user control I am not going to do that, as a post back could be initiated by a multiple number of events on different controls within the user control.
Thats my question! Thanks..
I'd like to find out the control that caused a postback to be raised. Obviously this could simply done in a control event handler. I am not going to do this method and would like no references as to how to do it this way as I already know how.
I know this may be getting into advanced or unheard of territory.
I have some custom web user controls that are dynamically created at run time along with other controls. I can still add an event handler to these controls, but unfortunately the event handler wont fire until the controls are re-created on the postback, but I don't want the start-up code running on a post back, I need it to run in the event of the control that cuased the post back. This works fine for my other controls on the form that arn't generated, but will not for this user control, so I need an alternative.
I need some indication in my page_load (or init) event that tells me that our user control has initiated the postback and to then run start up code.
Are there any techniques out there that allow me to dig into the postback and discover what control or control type made the postback?
Another solution I could add a client side handler that could set the value of a checkbox but due to the complexity of the user control I am not going to do that, as a post back could be initiated by a multiple number of events on different controls within the user control.
Thats my question! Thanks..