Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page-load executing twice

Reply
Thread Tools

Page-load executing twice

 
 
mart
Guest
Posts: n/a
 
      08-27-2003
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

 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      08-27-2003
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!
 
Reply With Quote
 
 
 
 
nfedin
Guest
Posts: n/a
 
      08-27-2003
"mart" <(E-Mail Removed)> wrote in message news:<0c0901c36ca0$389127b0$(E-Mail Removed)>...
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
twice method executing Op ASP .Net 1 11-23-2008 01:43 AM
SaveViewState executing twice tshad ASP .Net 7 08-29-2006 11:10 PM
SelectedIndexChanged method executing twice? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 0 08-20-2006 06:12 AM
Re: Query Executing twice in Datagrid! Raterus ASP .Net 2 07-20-2006 06:45 AM
twice(twice(x)) Kiuhnm C++ 2 04-01-2006 04:41 PM



Advertisments