Online Training for MVC Web Designing Development, MS SQL, Digital Marketing

Page IsPostBack in Application

What is IsPostBack in

IsPostBack is a Boolean type property of Page class, which indicates whether the page is being loaded for the first time or not! IsPostBack is always false by default.

ispostback in

You need to understand two things about the isPostBack in

Use of IsPostBack property in

IsPostBack property helps avoiding unnecessary database call every time page gets loaded, thus adds value in application performance improvement.

Let me give you an example, just assume you are working on a page with student data using a GridView, and on page you want to provide a functionality for updating every single row, in row there is field of “Subject List” displayed in a dropdown.

Now every time , one student data updated and loaded again, the subject list remain same, which you don’t need to fetch from database , in this situation you can put the subject list load method inside isPostBack clause.

How does isPostBack work

Page IsPostBack in Application

Group Training