Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delegate Hooks are getting erased
Message
 
À
04/08/2005 17:29:52
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01037879
Message ID:
01040485
Vues:
21
It seems to work the same. I put them in InitializeComponent because I saw the page_load hook in there so I assumed that was the place event hooks belonged. Apparently not.

Thanks



>>Sorry, that would be SelectedIndexChanged event. The equivalent of InteractiveChange in VFP.
>>
>>I put my hooks in InitializeComponent() of the page. Sometimes when the page has been edited in some way, the hooks I have added get erased and only the default hooks remain like the page_load hook. I have no way of knowing that this happened until the end user reports a bug.
>>
>>What is surprizing is that the event handler code is still there, just no hook.
>>
>>-E
>>
>
>I think you have to find another event to assign the delegates. Is there a problem with doing it at the top of Page.Load?
>
>I suggest this because the InitializeComponent event is the IDE's version of "holy ground". It gets executed every time the page is edited in the designer and VS doesn't like changes in there because it might prevent the page from loading into the designer. I guess it is overwriting your code.
>
>>>>I have a number of hooks where I attach a delegate event handler to controls that exist on a user control. For example I might have an event handler on a page that is supposed to react to an interactivechange event in a cbo contained in a user control.
>>>>
>>>>Well, occasionally the event delegate hook gets erased! This completely breaks my web site and makes me look like an idiot. Why would .NET erase a delegate hook? This core to the event model.
>>>
>>>Hi Eric,
>>>
>>>Not to nitpick, but there are no InteractiveChange events on web controls. Is this a UserControl that you have created with a custom InteractiveChange event?
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform