I am a bit curious how ASP.Net internally identifies that the request is a postback.
I have read in a Microsoft book that you can technically do a postback using both POST and GET methods
This means that commands do not have anything to do with postback.
I have tried to use Fiddler to see what the request headers are sending. I am thinking that it could be something to do with the viewstate but I am not sure.
I am a bit curious how ASP.Net internally identifies that the request is a
Share
You’re nearly right.
The correct event is fired based on the _EVENTTARGET and _EVENTARGUMENT variables which are sent as part of the request. I believe the IsPostBack is set based on the values of these. These determine which event to fire and with what arguments.
The actual submit is fired by the
__doPostBack()function in javascript.More detail here: http://dotnetslackers.com/Community/blogs/haissam/archive/2007/05/18/Which-Control-Caused-PostBack_2100_.aspx