please help to understand: IsPostBack

hi..please explain how (IsPostBack) work? can any body help me ..please hurry up PLZ PLZ PLZ

Comments

  • when you create a server side web form in an asp.net web page, the action of the form points to the current page.

    So when you click a server-side button for instance, you are essentially posting back (to the same page.)

    Now when an aspx page first loads IsPostBack will equal false. When you click the submit button, the page posts back and IsPostBack will equal true.

    Now most server controls store their state in a hidden HTML field called _VIEWSTATE. Typically, we want to load the aspx page w/ data, on the first page post NOT on post back, so we use the IsPostBack property to manage this ...

    [code]
    ' If this is the first time the web page is loading ...
    If Not Page.IsPostBack Then
    ' LOAD DATA
    End If
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion