5
Reply

what is the use of IsPostBack Property in ASP.Net.

purosotam gupta

purosotam gupta

10y
9.9k
0
Reply

    Postback is actually sending all the information from client to web server, then web server process all those contents and returns back to the client. Most of the time ASP control will cause a post back (e. g. buttonclick) but some don't unless you tell them to do In certain events ( Listbox Index Changed,RadioButton Checked etc..) in an ASP.NET page upon which a PostBack might be needed.

    using of the IsPostback Property we can check that page is Postback or not if page postback property is true then page is being post back if property is false then page is not postback

    http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback%28v=vs.110%29.aspx

    IsPostBack is used to check if the page is responding to a post back event, like clicking a button. So, lets say you have some textboxes for users to change some data and then click a button to submit the data. In the Page_Load you populate the textboxes with data, and the button click event captures that data and saves it.

    IsPostBack is a Boolean property of a page when is set (=true) when a page is first loaded. Thus, the first time that the page loads the IsPostBack flag is false and for subsequent PostBacks, it is true. An important point is that each time a PostBack occurs, the entire page including the Page_Load is ‘posted back‘ and executed.