Syntax help - Handles Mybase.Load

asp.net United States
  • 18 years ago

    Hi everyone, need some help (again):


    I'm reading this peace of vbscript code in ASP.NET - a ".aspx" file.


    My question is about the expression "MyBase", "MyBase.Load", what is the meaning and point of this expression?


    <script runat = "Server">


    Private Sub Page_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    ....


    >


    Thank you


    LMDG

  • 18 years ago

    MyBase in this case refers to the object that you are inheriting. Code for an aspx webform inherits the WebForm class and MyBase.Load is the Load event of the basic webform class.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++ : Where friends have access to your private members.” - Gavin Russell Baker