473,388 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problem With Page_Load

A.M
Hi,

Why the Page_Load events always triggers twice?

Thanks,
Ali


Nov 18 '05 #1
6 984
Make sure AutoEventWireup="false"
"A.M" <IH*******@sapm123.com> wrote in message
news:Oa**************@tk2msftngp13.phx.gbl...
Hi,

Why the Page_Load events always triggers twice?

Thanks,
Ali

Nov 18 '05 #2
Did you not read the response you got from "Felix[MSFT]" yesterday, or do
you not understand it, because you posted the question again in that thread,
and then post here now.
Nov 18 '05 #3
A.M
I can not see that post!
I tried to post is 3 times, I couldn't see it.
Then I removed those page codes, then here is the thread!! My outlook
express is fine because i can see other people's posts!!

I don't know whats going on!

"Michael Ramey" <raterus@localhost> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
Did you not read the response you got from "Felix[MSFT]" yesterday, or do
you not understand it, because you posted the question again in that thread, and then post here now.

Nov 18 '05 #4
You wouldn't happen to be using a browser interface to view these
newsgroups, would you? Certain kinds of code can mess with the browser, as
it is rendered as HTML in the browser document.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"A.M" <IH*******@sapm123.com> wrote in message
news:#K**************@TK2MSFTNGP11.phx.gbl...
I can not see that post!
I tried to post is 3 times, I couldn't see it.
Then I removed those page codes, then here is the thread!! My outlook
express is fine because i can see other people's posts!!

I don't know whats going on!

"Michael Ramey" <raterus@localhost> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
Did you not read the response you got from "Felix[MSFT]" yesterday, or do you not understand it, because you posted the question again in that

thread,
and then post here now.


Nov 18 '05 #5
Hi Ali,
Thank you for posting here. I find this post is a duplicated one with
another twos in the queue:
Subject: Page_Load

This is the third one you posted. Also, another MS support FelixWu[MSFT]
has replied you in the first one, I'm not sure whether you are able to see
the reply correctly? If not here is the reply's weblink in google:

http://groups.google.com/groups?hl=e...readm=nsDtQix6
DHA.3496%40cpmsftngxa07.phx.gbl&rnum=36&prev=/groups%3Fq%3DPage_Load%26hl%3D
en%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D30%26sa%3DN
Also, here is the original content of FelixWu[MSFT]'s reply, you may check
it if you event unable to visit its weblink in google:

----------------------------reply
content--------------------------------------------
From: fe*****@online.microsoft.com (Felix Wu [MSFT])
Date: Wed, 04 Feb 2004 12:15:12 GMT
Subject: RE: Page_Load
Newsgroups: microsoft.public.dotnet.framework.aspnet

Hi A.M,

You do not need to explicitly register the event handler Page_Load to the
Load event because it is registered by default:

<%@ Page %>
<HTML>
<HEAD>
<title>test</title>
<script language="vb" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
If Not Me.IsPostback Then
Response.Write("ABC" + "<br>" )
end if
End Sub
</script>
</HTML>

Actually, this behavior is controlled by the AutoEventWireup attribute in @
Page directive. This attribute indicates whether the page's events are
autowired. "true" if event autowiring is enabled; otherwise, false. The
default is true. If you disable it, "ABC" only is displayed once:

<%@ Page AutoEventWireup=False%>
<HTML>
<HEAD>
<title>test</title>
<script language="vb" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

If Not Me.IsPostback Then
Response.Write("ABC" + "<br>" )
end if
End Sub
</script>
</HTML>

Regards,

Felix Wu
----------------------------------------------------------------------------
If you have any other questions or need any assistance, please feel free to
post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 18 '05 #6
A.M
Thank you Steven. I found my answers here.
As I mentioned I couldn't see my previous two posts. Sorry about that.
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:9r**************@cpmsftngxa07.phx.gbl...
Hi Ali,
Thank you for posting here. I find this post is a duplicated one with
another twos in the queue:
Subject: Page_Load

This is the third one you posted. Also, another MS support FelixWu[MSFT]
has replied you in the first one, I'm not sure whether you are able to see
the reply correctly? If not here is the reply's weblink in google:

http://groups.google.com/groups?hl=e...readm=nsDtQix6 DHA.3496%40cpmsftngxa07.phx.gbl&rnum=36&prev=/groups%3Fq%3DPage_Load%26hl%3D en%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D30%26sa%3DN
Also, here is the original content of FelixWu[MSFT]'s reply, you may check
it if you event unable to visit its weblink in google:

----------------------------reply
content--------------------------------------------
From: fe*****@online.microsoft.com (Felix Wu [MSFT])
Date: Wed, 04 Feb 2004 12:15:12 GMT
Subject: RE: Page_Load
Newsgroups: microsoft.public.dotnet.framework.aspnet

Hi A.M,

You do not need to explicitly register the event handler Page_Load to the
Load event because it is registered by default:

<%@ Page %>
<HTML>
<HEAD>
<title>test</title>
<script language="vb" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
If Not Me.IsPostback Then
Response.Write("ABC" + "<br>" )
end if
End Sub
</script>
</HTML>

Actually, this behavior is controlled by the AutoEventWireup attribute in @ Page directive. This attribute indicates whether the page's events are
autowired. "true" if event autowiring is enabled; otherwise, false. The
default is true. If you disable it, "ABC" only is displayed once:

<%@ Page AutoEventWireup=False%>
<HTML>
<HEAD>
<title>test</title>
<script language="vb" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

If Not Me.IsPostback Then
Response.Write("ABC" + "<br>" )
end if
End Sub
</script>
</HTML>

Regards,

Felix Wu
-------------------------------------------------------------------------- --

If you have any other questions or need any assistance, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Johnson Jr. | last post by:
The problem is the following pseudo code causes you need to click buttons twice to get event. This is notable via debugging and single stepping. I can't seem to quite figure out how to do...
0
by: Paul Rees | last post by:
I am wondering if anyone has encountered a similar problem to the one that I am having. I have an ASP.NET page which has a table and a dropdownlist that was added at design time. The majority of...
7
by: Peter D.C. | last post by:
Hi I want to update data hold in several textbox controls on an asp.net form. But it seems like it is the old textbox values that is "re-updates" through a stored procedure who updates a SQL...
4
by: Kenneth P | last post by:
Hi, I have a .aspx file named testConnStr.aspx witin a try, catch, finally block that works just very nice, shows the data in a datagrid. I have one header saying "test ConnStr" and two server...
1
by: needin4mation | last post by:
Hi, I am uploading a file and changing a record in a database. When the database is updated, I retrieve the last_insert_id() to get the latest row key. I also have a Page_Load event that...
7
by: Martijn Saly | last post by:
Hi there, I've created a master page with some controls on it, a Calendar control among others. Now depending on the date(s) selected, the content page needs to be updated. In the masterpage...
2
by: COHENMARVIN | last post by:
I have a form with a Submit button. The user fills out the form, clicks the submit button, and then the page posts back to itself. Every time the page posts back to itself, the "Page_Load" event...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
by: Ranginald | last post by:
Hi, I have two pages. Default.aspx ....Codefile="default.aspx.cs" Inherits="Web" %> and Sculpture.aspx
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.