473,569 Members | 2,601 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 2747
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**@rediffmai l.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
2414
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 MyBase.OnPain(pe). But in my opinion it doesn't seem to be painted on the buffer. Everything works fine, but I think it should work better if my...
9
2097
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 utilize in myownclass but the method is private and can't be inheirited. I need to utilize that base class method. -- Dennis in Houston
9
9241
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
1178
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 through all the instances of this application and kills the one instance that is not itself and then shuts itself down. The idea is that in a...
5
2312
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 do in this case? Bit confusing! :) Thanks '<remarks/> Public Sub New() MyBase.New() Me.Url =
4
11846
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. Even if they are different, is there any harm in using it interchangeably?
2
4188
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
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8130
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2115
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 we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.