Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Any reason why Page_Load would be ignored?

Reply
Thread Tools

Any reason why Page_Load would be ignored?

 
 
Jim Bancroft
Guest
Posts: n/a
 
      01-27-2005

Inexplicably one of my aspx pages is ignoring the Page_Load handler. The
page worked fine this morning, but then I added a couple of "using"
directives and uncommented a method call about halfway down, and suddenly I
can't get Page_Load to run no matter what.

I've rebuilt the web project several times but nothing doing. VS .Net
debugger doesn't even stop on my breakpoints in the function, though it has
no problem on other, button-click, event handlers.

Has anyone seen this before, and even better, is there a checklist I run
through to diagnose it? I swear my changes were minor at best. I must have
missed _something_....


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      01-27-2005
is this still in the Initialize seciton:
this.Load += new System.EventHandler(this.Page_Load);




--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Jim Bancroft" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Inexplicably one of my aspx pages is ignoring the Page_Load handler. The
> page worked fine this morning, but then I added a couple of "using"
> directives and uncommented a method call about halfway down, and suddenly
> I can't get Page_Load to run no matter what.
>
> I've rebuilt the web project several times but nothing doing. VS .Net
> debugger doesn't even stop on my breakpoints in the function, though it
> has no problem on other, button-click, event handlers.
>
> Has anyone seen this before, and even better, is there a checklist I run
> through to diagnose it? I swear my changes were minor at best. I must
> have missed _something_....
>



 
Reply With Quote
 
 
 
 
Fabio
Guest
Posts: n/a
 
      01-27-2005
Jim Bancroft wrote:
> Has anyone seen this before, and even better, is there a checklist I run
> through to diagnose it? I swear my changes were minor at best. I must have
> missed _something_....


Hey Jim,
I had seen something similar in the past: the solution was to manually delete
the dll and rebuild the solution - somehow rebuilding was not entirely
overwriting the dll, but physically deleting it from the disk and forcing a
fresh build worked...

HTH

--
Software is like sex: it's better when it's free -- [Linus Torvalds]

Fabio Marini - A+, RHCT, MCDBA, MCAD.NET
To reply: news [at] mamakin1976 [dot] plus [dot] com
 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      01-27-2005
I'd start by removing the "using" directives
and recommenting the method call.

Then. I'd work my way up again,
until the behavior begins again.

Undoing what you did sometimes works wonders


Juan T. Llibre
ASP.NET MVP
===========
"Jim Bancroft" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Inexplicably one of my aspx pages is ignoring the Page_Load handler. The
> page worked fine this morning, but then I added a couple of "using"
> directives and uncommented a method call about halfway down, and suddenly
> I can't get Page_Load to run no matter what.
>
> I've rebuilt the web project several times but nothing doing. VS .Net
> debugger doesn't even stop on my breakpoints in the function, though it
> has no problem on other, button-click, event handlers.
>
> Has anyone seen this before, and even better, is there a checklist I run
> through to diagnose it? I swear my changes were minor at best. I must
> have missed _something_....
>



 
Reply With Quote
 
Jim Bancroft
Guest
Posts: n/a
 
      01-27-2005
Hi Curt; I do have the system event handler code as you mentioned in my
page, in the InitializeComponent function.

Fabio, I deleted all the dlls from my web application's bin directory,
rebuilt it, and still the same problem. Is that the location you were
referring to, or should I be looking elsewhere? Just for kicks I removed
all the aspx and code-behind content and recompiled with a blank page,
saved, reloaded the page my browser to see if it took effect (it did),
closed VS .Net, repasted all the code and it's back to square one. Same
problem.

And Juan, I'm removing using directives and recommenting now, trying to find
the right mix that will work.

Thanks again guys. It sounds like there's just something strange that I
_must_ be missing. Some days I miss dos 5.0, you know?




 
Reply With Quote
 
Jim Bancroft
Guest
Posts: n/a
 
      01-28-2005
Turns out I had accidentally deleted the OnInit function in my haste to
un-delete my original method call:


override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}


Whoops....don't I have egg on my face. Thanks again, everyone, and sorry
for the trouble.

-Jim


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
in VB.NET Page_load of a base class called after the derived class Page_load ? z. f. ASP .Net 0 10-19-2004 12:01 PM
Why does page_load fire twice when inheriting from a common overridable Page_Load bminder ASP .Net 1 02-23-2004 08:54 PM
Is there some reason why warn and die would be very very slow? Sara Perl Misc 0 07-11-2003 03:10 PM



Advertisments