Regarding postback..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • henrick
    New Member
    • Mar 2010
    • 1

    #1

    Regarding postback..

    Here s the problem
    Code:
    if (!ispostback)
    {
    //statements
    
    }

    When I Refresh the page on the browser the statments under if condition should be executed... But when I refresh the page it does not enter into if condition and its statements r not executed...
    Wats the solution...
    Last edited by Frinavale; Mar 3 '10, 02:29 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    A PostBack occurs when the user has clicked a control on the page that causes the page to "post back" to the server.

    You can check if it is the first time the user has loaded the page by checking IsPostback==fal se. If you want something to execute if it is not the first time the page has loaded then you should be checking if IsPostback == true.

    -Frinny

    Comment

    Working...