Getting control that fired postback in page_init

Posted by Clint on Stack Overflow See other posts from Stack Overflow or by Clint
Published on 2010-03-19T17:09:04Z Indexed on 2010/03/19 17:11 UTC
Read the original article Hit count: 279

Filed under:
|

I have a gridview that includes dynamically created dropdownlist. When changing the dropdown values and doing a mass update on the grid (btnUpdate.click), I have to create the controls in the page init so they will be available to the viewstate. However, I have several other buttons that also cause a postback and I don't want to create the controls in the page init, but rather later in the button click events.

How can I tell which control fired the postback while in page_init? __EVENTTARGET = "" and request.params("btnUpdate") is nothing

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about postback