Page-load executing twice

Discussion in 'ASP .Net' started by mart, Aug 27, 2003.

  1. mart

    mart Guest

    I am experiencing a weird problem with some buttons on my
    webpage. The page_load is executing twice when a button is
    clicked.

    If I replace the button for a Linkbutton the page_load
    only loads once.

    I've set the Autoeventwireup to false.

    Could it be a framework problem ? On other computers the
    bug is difficult to reproduce but on mine the problem is
    constant. I am using framework version 1.0 with SP2.

    Thanks for your help
     
    mart, Aug 27, 2003
    #1
    1. Advertising

  2. mart

    Natty Gur Guest

    mart hi,

    does it happaned on plain form with just one button? its probebly
    connected to something in your code, can you post it ?

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Aug 27, 2003
    #2
    1. Advertising

  3. mart

    nfedin Guest

    "mart" <> wrote in message news:<0c0901c36ca0$389127b0$>...
    > I am experiencing a weird problem with some buttons on my
    > webpage. The page_load is executing twice when a button is
    > clicked.
    >
    > If I replace the button for a Linkbutton the page_load
    > only loads once.
    >
    > I've set the Autoeventwireup to false.
    >
    > Could it be a framework problem ? On other computers the
    > bug is difficult to reproduce but on mine the problem is
    > constant. I am using framework version 1.0 with SP2.
    >
    > Thanks for your help



    The way I understand it, the page posts back to the server when you
    press the button (1st page load) and then posts again to show the
    changes that occured after the button click executed (2nd page load).
    You could use the Page.IsPostBack property to only run the Page_Load
    event when the page first loads. Hope this helps.

    Neil
     
    nfedin, Aug 27, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Dong

    asp.net page load twice problem

    Tony Dong, Jun 2, 2005, in forum: ASP .Net
    Replies:
    11
    Views:
    39,557
    BillFR
    Sep 1, 2011
  2. Bob Barrows

    Re: Page Load Event Fires Twice

    Bob Barrows, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    431
    Bob Barrows
    Jul 9, 2003
  3. Steve C. Orr, MCSD

    Re: Page Load Event Fires Twice

    Steve C. Orr, MCSD, Jul 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    608
    Wray Smallwood
    Jul 10, 2003
  4. Samy
    Replies:
    2
    Views:
    1,401
  5. Kiuhnm

    twice(twice(x))

    Kiuhnm, Apr 1, 2006, in forum: C++
    Replies:
    2
    Views:
    422
    Kiuhnm
    Apr 1, 2006
Loading...

Share This Page