|
-
Sep 3rd, 2002, 03:10 PM
#1
Thread Starter
Member
Page_Load event
I have observed an effect on my aspx pages that I just need to confirm. If I put in my .aspx code-behind file a custom function and after that, the code of my Page_Load event, asp.net ignores my Load event. This way:
Public Function MyFunction() As String
End Function
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
But if I change the position between the two routines, the Load event runs. Is it really mandatory that my Page_Load be the first routine of my page?
Thanks,
Robert
-
Sep 4th, 2002, 12:49 AM
#2
Junior Member
I have one Public Function and a few Private Functions and Subs in front of my Page_Load with no problems. Do you have the latest SP (Sp1?) installed.
-
Sep 4th, 2002, 07:05 AM
#3
Thread Starter
Member
Hi.
Yes. I have installed the SP2 and still have the same effect.
Thanks,
Robert
-
Sep 4th, 2002, 08:22 AM
#4
shouldnt make any difference unless you have some code the MyFunction that is causing a problem.
-
Sep 4th, 2002, 09:08 AM
#5
Junior Member
Well, I will believe it. I have run into some minor glitches.
VB.NET REPLACE is supposed to return a zero-length string if there is a zero-length string coming in but it returns NOTHING.
Code:
Dim strW As String
strW = " "
strW = Trim(strW)
If strW Is Nothing Then Stop
strW = Replace(strW, " ", "_")
If strW Is Nothing Then Stop '<-- Stops here
-
Sep 12th, 2002, 08:11 PM
#6
Hyperactive Member
Hi Robert
ASP.NET is of a event-driven programming model just like what VB6 was.
So, NO where you place your routines doesnt matter which runs first or second.
Check your codes again to make sure or post your codes so that we might be able to help
William T
Software Architect / Chief Software Developer
Softwaremaker.Net Pte Ltd
http://www.Softwaremaker.net
*** Things are always the darkest before they go pitch black ***
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|