Each ASP.NET page is wrapped with a <form> element, because the whole framework revolves around POST commands.
ASP.NET provides "web controls" that are object-oriented abstractions of HTML elements (and in some cases, groups of elements). In your server code, you can attach commands to various events on web controls (for example, Button.OnClick , TextBox.OnChanged ) - frames lay them using a combination of hidden fields and generated javascript. Generated javascript usually sets the hidden field with several values to indicate (for example) which control triggered the message and command arguments (if applicable), then submits the form.
ViewState is a method used by the environment to serialize client state. This is an alternative to using the session to a large extent, trading large HTML payloads for lower server memory.
Jeff sternal
source share