Page.IsPostBack Property in Asp.Net

Here we will discuss the Page.IsPostBack Property in Asp.Net.
– Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.
– The IsPostBack property can be used to determine if the page is submitted to itself. When a form is submitted back to the same page that contains it, it’s called a post back. ASP.NET provides a property called IsPostBack that is TRUE when the page is being loaded as a result of a post back, and is FALSE otherwise.
– Below is the way to use IsPostBack property
C#.Net Syntax:
private void Page_Load()
    if (!IsPostBack)
        //You can write here the code, which you want to execute in the first time when the page is  loaded.
VB.Net Syntax:
Sub Page_Load
         IF Not IsPostBack THEN
                    ‘ You can write here the code, which you want to execute in the first time when the  page is loaded.
          END IF
End Sub

Read some more article:

New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

– Asp.Net MVC Techniques to transfer data from Controller to View

– How to set up session state in our ASP.NET Core and MVC Core Web applications?

– Steps to archive log files using NLog with ASP.NET Core

Check out Best Alternative to InfoPath -> Try Now


(Installation & Features)

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →