Pradeep
What is IsPostBack? How to use it?
By Pradeep in ASP.NET on Aug 31 2009
  • Aditya Parmar
    Jul, 2015 27

    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.How to ispostback in asp.net IsPostBack is a property of the Asp.Net page that tells whether or not the page is on its initial load or if a user has perform a button on your web page that has caused the page to post back to itself. The value of the Page.IsPostBack property will be set to true when the page is executing after a postback, and false otherwise. We can check the value of this property based on the value and we can populate the controls on the page.Is Postback is normally used on page _load event to detect if the web page is getting generated due to postback requested by a control on the page or if the page is getting loaded for the first time.

    • 3
  • Partap Tanwar
    Aug, 2009 31

    IsPostBack event is generated by the web controls to alert the server to take respected action of the event generated. When the button is clicked then click event is generated which further cause ispostback event & it alerts the server to take respected action during postback event.
    Property Value
    true if the page is being loaded in response to a client post back; otherwise, false.
    void Page_Load()
    {
    if (!IsPostBack)
    {
    // Validate initially to force asterisks
    // to appear before the first round trip.
    Validate();
    }
    }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS