Who fires the postback?

  • Thread starter Thread starter Kevin
  • Start date Start date
Request.Form["__EVENTTARGET"] for the controls that postback with javascript
calls. It will return an empty string if the postback was fired by a button
or an imagebutton. You can either iterate through the Form Keys collection
or try to find there by the button/imagebutton id.
 
Sure. It is called sender. :-)

One place to look is in the Page_Load event, but I would be careful about
creating code trees in this event, as you can end up with some funky stuff
if you try to make all of your decisions here.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
 
Back
Top