balakrishna pulaparthi
Could you explain IS POST BACK?
Posted by balakrishna pulaparthi in .Net | ASP.NET on Nov 03, 2011
0
Do you know the answer for this question? Post it below.
Guest

It is 1st request to the page

Posted by Amit Bhagat on Jan 02, 2012

IS POST BACK

Post back is when we send page to server for some processing and not rendering first time.  Is Post Back is used to check weather page is rendering first time or requesting for server task

private void Page_Load()
{
             if (!IsPostBack)
               {
                      Function();
                }
}

In above example if page is rendering first time then function()  will execute and if page is rendering not first time then the Function() will not execute .

Posted by Puneet Sharma on Nov 10, 2011

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 following example shows how to test the value of the IsPostBack property when the page is loaded in order to determine whether the page is being rendered for the first time or is responding to a postback. If the page is being rendered for the first time, the code calls the Page.Validate method.

The page markup (not shown) contains RequiredFieldValidator controls that display asterisks if no entry is made for a required input field. Calling Page.Validate causes the asterisks to be displayed immediately when the page is rendered, instead of waiting until the user clicks the Submit button. After a postback, you do not have to call Page.Validate, because that method is called as part of the Page life cycle.

private void Page_Load()
{
    if (!IsPostBack)
    {
        // Validate initially to force asterisks
        // to appear before the first roundtrip.
        Validate();
    }
}

Posted by Govind Kumar on Nov 07, 2011
Sponsored by
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
Sponsored by
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | REPORT ABUSE © 2011 C# Corner. All contents are copyright of their authors.