473,508 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MyBase.Load

Often I come across the following Page_Load sub declaration in ASPX
pages:

Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Handles
MyBase.Load
........
........
End Sub

What does MyBase.Load do here? What for it is used? Is there any
difference between the above Page_Load sub declaration &

Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)

Oct 8 '06 #1
1 2740
Howdy,

Yes, there is a difference.

The First one is explicit declaration that attaches event handler to Load
event and will work even if the autorwireevents is set to false (default for
code behind files - Asp.net 1.1). the second will only work if
autorwireevents="true" (asp.net attaches handler for you when page is
compiled - default for dynamic compilation and code files in asp.net 2.0)

Hope this helps

--
Milosz Skalecki
MCP, MCAD
"rn**@rediffmail.com" wrote:
Often I come across the following Page_Load sub declaration in ASPX
pages:

Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Handles
MyBase.Load
........
........
End Sub

What does MyBase.Load do here? What for it is used? Is there any
difference between the above Page_Load sub declaration &

Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)

Oct 8 '06 #2

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

Similar topics

5
2405
by: DraguVaso | last post by:
Hi, I have my custom Inherited DataGrid. I override the OnPaint-event to speed up things and avoid flikkering using Double Buffering. To draw the normal things of the DataGrid I have to call the...
9
2089
by: Dennis | last post by:
When a class (myownclass) inheirits another class, how can I get an object reference to the underlyng MyBase class instance from within myownclass. The base class has a method that I want to...
9
9226
by: Henry Padilla | last post by:
I realize that MyBase.MyBase is illegal, so how DO I get to the Parent of MyBase? In Short what is the VB equivalent of "::"? Example: Class Component Inherits Hashtable
1
1172
by: Support | last post by:
Hello: I have an application that I wish to update upon login via login script but since the application is in the start-up menu, I cannot override the exe, so, I wrote a function that iterates...
5
2308
by: TheBee | last post by:
Hello, I have seen the following routines in a class and don't understand how they work. For one, why two new() routines? Which is executed? Why not just use one routine? What does the mybase...
4
11823
by: Sugan | last post by:
Hi, i came across custom usercontrols in VB 2005 and i'm not clear about the difference between "Me" and "MyBase". 1. What is the difference between the two keywords in a UserControl. 2....
2
4180
by: shapper | last post by:
Hello, Could somebody tell me what is the difference between MyBase and Me? For example, should I use Page_Init(....) Handles MyBase.Init Or Page_Init(....) Handles Me.Init
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.