I've read quite a few threads on these groups about this. When
someone says the following:
"My Page_Load gets called twice on a button click postback"
The replies are:
"Do you have AutoEventWireup=True in your page header?"
In my project, I have this set to false - everywhere.
Also, if I keep repeating exactly the same button click action, over
and over again, sometimes the Page_Init and Page_Load gets called
twice, sometimes it just gets called once. It almost appears to be
random.
More specifically, my aspx page contains several web user controls.
On one web user control I have the button in question, and it's when I
click this, that the Page_Init and Page_Load of another web user
control on the same aspx form either gets called once or twice.
What should I do? Do you think something has got muddled up
internally, and I should delete some files and start again?
Thank you,
Regards, dnw. 6 5853
look at the generated OnInit code, and you will see the event wireup. check
for duplicate entries.
-- bruce (sqlwork.com)
"Dot net work" <do***@hotmail.com> wrote in message
news:77**************************@posting.google.c om...
| I've read quite a few threads on these groups about this. When
| someone says the following:
|
| "My Page_Load gets called twice on a button click postback"
|
| The replies are:
|
| "Do you have AutoEventWireup=True in your page header?"
|
| In my project, I have this set to false - everywhere.
|
| Also, if I keep repeating exactly the same button click action, over
| and over again, sometimes the Page_Init and Page_Load gets called
| twice, sometimes it just gets called once. It almost appears to be
| random.
|
| More specifically, my aspx page contains several web user controls.
| On one web user control I have the button in question, and it's when I
| click this, that the Page_Init and Page_Load of another web user
| control on the same aspx form either gets called once or twice.
|
| What should I do? Do you think something has got muddled up
| internally, and I should delete some files and start again?
|
| Thank you,
| Regards, dnw.
I'm sorry, I don't know what you mean. How do I look at generated
OnInit code? I did a global search for "OnInit" in my project, and
there wasn't a match found.
Apologies for being a bit thick,
-dnw.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Which broswer u use ?
I have faced this problem on FireFox
but it is ok on IE and netscape
"Dot net work" <do***@hotmail.com> wrote in message
news:77**************************@posting.google.c om... I've read quite a few threads on these groups about this. When someone says the following:
"My Page_Load gets called twice on a button click postback"
The replies are:
"Do you have AutoEventWireup=True in your page header?"
In my project, I have this set to false - everywhere.
Also, if I keep repeating exactly the same button click action, over and over again, sometimes the Page_Init and Page_Load gets called twice, sometimes it just gets called once. It almost appears to be random.
More specifically, my aspx page contains several web user controls. On one web user control I have the button in question, and it's when I click this, that the Page_Init and Page_Load of another web user control on the same aspx form either gets called once or twice.
What should I do? Do you think something has got muddled up internally, and I should delete some files and start again?
Thank you, Regards, dnw.
I am using IE6 with Windows 2000 Professional.
"Tony Cheng" <sd***@fdfsds.com> wrote in message news:<uO**************@TK2MSFTNGP11.phx.gbl>... Which broswer u use ? I have faced this problem on FireFox but it is ok on IE and netscape
"Dot net work" <do***@hotmail.com> wrote in message news:77**************************@posting.google.c om... I've read quite a few threads on these groups about this. When someone says the following:
"My Page_Load gets called twice on a button click postback"
The replies are:
"Do you have AutoEventWireup=True in your page header?"
In my project, I have this set to false - everywhere.
Also, if I keep repeating exactly the same button click action, over and over again, sometimes the Page_Init and Page_Load gets called twice, sometimes it just gets called once. It almost appears to be random.
More specifically, my aspx page contains several web user controls. On one web user control I have the button in question, and it's when I click this, that the Page_Init and Page_Load of another web user control on the same aspx form either gets called once or twice.
What should I do? Do you think something has got muddled up internally, and I should delete some files and start again?
Thank you, Regards, dnw.
The Private Sub InitializeComponent() section is always completely
empty, for all of my projects. Is that why I can't seem to find what
you are referring to?
(I'm using VB.NET and VS.Net 2002)
Thanks, dnw.
"bruce barker" <no***********@safeco.com> wrote in message news:<ef**************@TK2MSFTNGP15.phx.gbl>... look at the generated OnInit code, and you will see the event wireup. check for duplicate entries.
-- bruce (sqlwork.com) "Dot net work" <do***@hotmail.com> wrote in message news:77**************************@posting.google.c om... | I've read quite a few threads on these groups about this. When | someone says the following: | | "My Page_Load gets called twice on a button click postback" | | The replies are: | | "Do you have AutoEventWireup=True in your page header?" | | In my project, I have this set to false - everywhere. | | Also, if I keep repeating exactly the same button click action, over | and over again, sometimes the Page_Init and Page_Load gets called | twice, sometimes it just gets called once. It almost appears to be | random. | | More specifically, my aspx page contains several web user controls. | On one web user control I have the button in question, and it's when I | click this, that the Page_Init and Page_Load of another web user | control on the same aspx form either gets called once or twice. | | What should I do? Do you think something has got muddled up | internally, and I should delete some files and start again? | | Thank you, | Regards, dnw.
I have solved my problem.
I created brand new aspx files, and re-dragged and dropped my existing
web user controls on to them, and now I no longer have the
Page_Init/Page_Load sub routines getting called twice.
-dnw.
"bruce barker" <no***********@safeco.com> wrote in message news:<ef**************@TK2MSFTNGP15.phx.gbl>... look at the generated OnInit code, and you will see the event wireup. check for duplicate entries.
-- bruce (sqlwork.com) "Dot net work" <do***@hotmail.com> wrote in message news:77**************************@posting.google.c om... | I've read quite a few threads on these groups about this. When | someone says the following: | | "My Page_Load gets called twice on a button click postback" | | The replies are: | | "Do you have AutoEventWireup=True in your page header?" | | In my project, I have this set to false - everywhere. | | Also, if I keep repeating exactly the same button click action, over | and over again, sometimes the Page_Init and Page_Load gets called | twice, sometimes it just gets called once. It almost appears to be | random. | | More specifically, my aspx page contains several web user controls. | On one web user control I have the button in question, and it's when I | click this, that the Page_Init and Page_Load of another web user | control on the same aspx form either gets called once or twice. | | What should I do? Do you think something has got muddled up | internally, and I should delete some files and start again? | | Thank you, | Regards, dnw. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gary |
last post by:
When attempting to write a PDF stream to the web browser,
the Page_Load event fires twice if a user has Internet
Explorer configured to 'Check for newer versions of stored
pages: Every visit to...
|
by: Brad |
last post by:
I have web user controls (ascx files) in multiple support assemblies; I'm
building on a Commerce Server SDK sample. My problem is that the code
behind Page_Load event is never getting called for...
|
by: malcolm |
last post by:
Inside of a Page class, how do I capture the Request object values
before the Page_Load event is called of that Page? I have a situation
where I have many server controls on a Page that get...
|
by: Julia |
last post by:
Hi Everyone,
I am using webbrowser control to post data to an aspx page. However, for
some reason, the aspx page sometimes will execute page_load event twice, and
sometimes execute it once. So I...
|
by: Ed |
last post by:
Has anyone seen this one? I have a situation where code in my page_load event
is firing twice for mozilla firefox users. Everything is fine in IE6. I set
breakpoints and verified.
The second time...
|
by: Nathan Sokalski |
last post by:
What is the difference between the Page_Init and Page_Load events? When I
was debugging my code, they both seemed to get triggered on every postback.
I am assuming that there is some difference,...
|
by: Spectre1337 |
last post by:
Hello,
to my understanding the ASP.NET process works as follows:
1) Page_Init(): At this moment the user should allocate his controls, set their IDs and connect them to the page...
|
by: fiefie.niles |
last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a
sub mySub that does not do anything (for testing purposes). But,
Page_Load gets called twice.
On every single ASPX page in my...
|
by: David C |
last post by:
I spent the last four hours trying to figure out why Page_Load would
execute twice. Even stranger was that everything within if (!
IsPostBack){....} executed twice as well. There is no rhyme or...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| | |