Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Authentication
Message
De
15/01/2004 09:07:15
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00863824
Message ID:
00867071
Vues:
36
That did the trick. I recreated the page and everything worked fine.


Thanks Rick.





>I can attest to this - I've seen this a few times before myself. I don't think this has anything to do with MM, but is a weird routing bug in ASP.Net.
>
>I've seen this myself frequently when I cut and past components that have events defined. The event handler code is generaetd and even loads, but the events never fire.
>
>My guess is that this has something to do with resources related to a page. Somehow there's some info in there that says which events fire and how even though the code is there it doesn't. When I reviewed the code that ASP.net generates I noticed that there were a few oddities in ASP.Net's native handling of the handlers - it gets rid of the handler and then adds its own (this is from the compiled code of the ASPX page).
>
>This doesn't help, but you might try creating a new page and then copying the stuff back to it and see if the code fires then. I'm sure it will even if the resulting page will look otherwise identical...
>
>+++ Rick ---
>
>
>
>>>Steve,
>>>
>>>>No, I stepped through the code and still couldn't figure out why my Page_Load code never executes. I ended up moving on to some other area of the application.
>>>
>>>This should be pretty straight-forward...Page_Load is an event handler method, in order for it to fire:
>>>
>>>1. You should have the following code in your form's InitializeComponent method which registers the Page_Load method as an event handler for the Load event:
>>>
>>>
this.Load += new System.EventHandler(this.Page_Load);
>>>
>>>2. You should have the following code in your form's OnInit() method, which calls InitializeComponent:
>>>
>>>
override protected void OnInit(EventArgs e)
>>>{
>>>	this.RequiresSecurity = true;
>>>	//
>>>	// CODEGEN: This call is required by the ASP.NET Web Form Designer.
>>>	//
>>>	InitializeComponent();
>>>	base.OnInit(e);
>>>}
>>>
>>>Is this code executing in your form?
>>>
>>>Regards,
>>
>>That code is there and it is executing, but if I set a breakpoint on one of the lines in my Page_Load, it never hits it.
>>
>>The way that I have this set up is I have a form called aBusinessWebPage that inherits from OakLeaf.MM.Main.Web.UI.mmBusinessWebPage. That page has a Page_Load event handler with no code, which is registered in the InitializeComponent method, and it has the OnInit code to call InitializeComponent and then call the base.OnInit. This page also has an override of the RedirectToLogin method.
>>
>>I then created a web page that inherits from my new aBusinessWebPage that has code in the Page_Load to create the bizobj reference, register it, and get the data. It also has the above mentioned OnInit code and the event handler registration code in the InitializeComponent method.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform