Asp.net can check page_load if click event triggered?
3 answers
You can check the flag IsPostBack
to make sure it was a postback and not a bootstrap. This might be what you need. Alternatively, you can check Request.Form["__EVENTTARGET"]
from which you can get information about the control that raised the event, and hence find out if it was one of your buttons.
+5
source to share