Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting all possible events for a control in C#
Message
De
04/03/2009 11:18:34
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01385323
Message ID:
01385508
Vues:
24
>>>>>Yes, that's what I meant. Thanks.
>>>>
>>>>This seems to work for all controls but my webform. I can't find a way to view all the possible events for my form.
>>>
>>>Furthermore, if I add an event for a control in ASP.NET, and then remove the event hander in code, I also have to go to the markup of the page and remove the event attribute from the control manually. I didn't have to do this in VB. Is this a C# thing?
>>
>>Yes, I had the same problem too, as I recall, using VS 2008 C#. I even believe I posted it on some forum or in MS feedback forum, I forgot details.
>
>It's not a problem, that's just the way it works.
>
>Not sure about ASP.NET but it's very easy to fix in C#.NET (and presumably VB). The build error refers to the orphan line in the code file generated by the designer. Double clicking the error takes you to the line of code, where you can delete it. Takes about 5 seconds. I don't even bother deleting the line before building, it's slower that way.

Mike,
The problem I mentioned was specifically an ASP.NET issue. The markup for the control has an attribute for the event and the pointer to your method. If I add an event for a textbox and decide it wasn't the right event, I can't just delete the event method in code - I actually have to open the markup, find my control, and remove the attribute which is a huge PITA.
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform