Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7621447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:11:51+00:00 2026-05-31T04:11:51+00:00

The following code was taken from the ASP.NET page class (using Reflector): Public Custom

  • 0

The following code was taken from the ASP.NET page class (using Reflector):

Public Custom Event InitComplete As EventHandler
        AddHandler(ByVal value As EventHandler)
            MyBase.Events.AddHandler(Page.EventInitComplete, value)
        End AddHandler
        RemoveHandler(ByVal value As EventHandler)
            MyBase.Events.RemoveHandler(Page.EventInitComplete, value)
        End RemoveHandler
    End Event

Why is there no RAISE EVENT? The following article suggests there should be a RAISE EVENT: http://msdn.microsoft.com/en-us/library/ms184583%28v=vs.90%29.aspx. I would expect to see:

Public Custom Event InitComplete As EventHandler
        AddHandler(ByVal value As EventHandler)
            MyBase.Events.AddHandler(Page.EventInitComplete, value)
        End AddHandler
        RemoveHandler(ByVal value As EventHandler)
            MyBase.Events.RemoveHandler(Page.EventInitComplete, value)
        End RemoveHandler
        Raise Event
        End Raise Event
    End Event

I realise this is probably a basic question, but I am new to custom events and it is proving to be more difficult than I anticipated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:11:52+00:00Added an answer on May 31, 2026 at 4:11 am

    As I wrote in my answer to your previous question: this indicates that Page wasn’t written in VB.

    .NET events don’t have to have “raise” accessors. C# doesn’t even have any syntax to let you specify a raise accessor.

    VB, however, does make it a requirement of custom events. That’s fine – any code generated from VB with a custom event will have a raise accessor. VB can’t force its requirements onto other languages though – so any code which has an event without a raise access has no direct equivalent in VB.

    Leave events out of things for a minute – suppose someone invented a new language called Humbug, which compiled to IL. It would be feasible for Humbug to specify that properties had to always have a getter and a setter. You couldn’t write a property with only a getter or only a setter. It’s fine for that to target IL, although the language would have to interoperate with code which only specified one part of a property. Any code in VB or C# which had a read-only (or write-only, though that’s rare) event would simply not be representable in Humbug.

    If you can get your head round that, just apply the same logic to events and the raise accessor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following is taken from page 56 of Professional ASP.NET MVC 1.0 . When
I have the following code which pulls json data from an ASP.NET page and
I have the following piece of code taken from the PHP manual on the
The following code is a combination of samples taken from red5. Basically I am
How should I understand $(select option:selected) in the following code ? (taken from here
Hey all, the following is a snippet of code taken from the unix ptx
When a user log into my asp.net site I use the following code: FormsAuthentication.RedirectFromLoginPage(userid,
In my asp.net web application, I'm using asp.net forms authentication with following configuration. <authentication
I am following Phil Haacks tutorial on using JQGrid with ASP.Net MVC. My application
I'm having hard time understanding the following C# code. This code was taken from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.