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 6652911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:12:03+00:00 2026-05-26T01:12:03+00:00

An asp.net (mostly webforms) team I work on has recently decided to make the

  • 0

An asp.net (mostly webforms) team I work on has recently decided to make the move from vb.net to c#. The people who used to be on the team who couldn’t read/write C# code well had since moved on, and each time we hired a new person it became more of a problem for us to be a vb.net shop.

I’ll save the standard vb/c# language war stuff and just stick with the one thing that I ran into today.

With vb.net, when we want to handle some event from some object, we just pick the object out of the list in the upper left, pick the event out of the list on the upper right, and it creates the fully wired up event handler. It’s also very clear that the method is an event handler due to the “Handles … ” at the end.

In the C# world, it seems we are left with a few poor options.

1) Manually wireup the event by typing the name of the event and event handler in the aspx markup. Like actually writing “OnLoad=SomeFunction” in the aspx. (EDIT: I didn’t realize that his only applied to the form and not to any contained controls, so I guess this isn’t really an option)

2) Using auto wireup events, and naming methods and signatures correctly so that they match up.

I’m hoping I’m missing some other much better option.

With these 2 options that I’ve seen so far:

1) we have to know the event names and event arguments. We can’t just look down the list and be like “Oh good this has OnItemClick”, I have to go research that in some control documentation. Likewise I’d have to go research the event args to find out that ItemClick needs a RadPanelBarEventArgs as the 2nd parameter. Wasted time.

2) I get no compile check on anything I’m doing with regard to connecting events. If I name the method signature wrong, or if I type it in wrong in the aspx page, everything will compile just fine until runtime when the mismatch will blow things up. (EDIT: what I mean is if I type onClick=”ABC” and the event handler is really named “ABCD” this will not be caught at compile time. With VB, issues with renaming/mistyping event handler names are caught at compile time, because of the “Handles”. Same goes for if I have onClick=”ABC” and this controls onClick really needs a SpecialEventArgs but I accidentally use SomeRegularEventArgs)

I’m hoping we missed something and there is a better way to do this.

  • 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-26T01:12:03+00:00Added an answer on May 26, 2026 at 1:12 am

    This is a known ‘bug’ or missing feature. See Visual studio 2010 showing available events from code behind

    If you want to auto-generate events in C#:

    • Go to your aspx page in Design View.
    • Make sure the properties panel is visible
    • Either select a control with your mouse, or use the
      dropdown under properties to select the control.
    • Move to the Events tab (the lightning bolt)
    • Find the event you want to wire up and either write in a name and hit Enter, leave it empty and hit Enter, or Double-click it.
    • It will create the event handler with all the
      properties.

    As for Number 2. Are you putting your code in a code-behind file? .aspx.cs?

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

Sidebar

Related Questions

I have a website running a basic ASP.NET application that is mostly used from
I have mostly worked with ASP.NET WebForms and more recently MVC. I am now
I'm a total newbie at Entity Framework and ASP.Net MVC, having learned mostly from
i have been building websites using vs 2008 (mostly asp.net mvc, jquery and webforms).
I have a classic ASP 2.0 project coming up. I mostly do ASP.NET WebForms
I'm not very experienced in ASP.Net, as I work mostly with PHP. I'm trying
Long time ASP.NET Webforms developer, new to Ajax development (mostly via the UpdatePanel control
I have used ASP.NET in mostly intranet scenarios and pretty familiar with it but
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
In a rather simple ASP.NET application where the user can upload a image, mostly

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.