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%40cpms ftngxa07.phx.gb l&rnum=36&pre v=/groups%3Fq%3DPa ge_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.publi c.dotnet.framew ork.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.EventArg s)
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.EventArg s) 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.)