The Page class includes a property called the IsPostBack property, which you can use to detect whether the page has already been posted back to the server.
Because of View State, when you initialize a control property, you do not want to initialize the property every time a page loads. Because View State saves the state of control properties across page posts, you typically initialize a control property only once, when the page first loads.
In fact, many controls don't work correctly if you re-initialize the properties of the control with each page load. In these cases, you must use the IsPostBack property to detect whether or not the page has been posted.
if(!Page.isPostBack)
{
//not postback means first time initiation.
}