473,725 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any reason why Page_Load would be ignored?


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_....
Nov 19 '05 #1
5 1113
is this still in the Initialize seciton:
this.Load += new System.EventHan dler(this.Page_ Load);


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jim Bancroft" <as******@nowhe re.com> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...

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_....

Nov 19 '05 #2
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
Nov 19 '05 #3
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" <as******@nowhe re.com> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...

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_....

Nov 19 '05 #4
Hi Curt; I do have the system event handler code as you mentioned in my
page, in the InitializeCompo nent 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?


Nov 19 '05 #5
Turns out I had accidentally deleted the OnInit function in my haste to
un-delete my original method call:
override protected void OnInit(EventArg s e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeCompo nent();
base.OnInit(e);
}
Whoops....don't I have egg on my face. Thanks again, everyone, and sorry
for the trouble.

-Jim
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
3540
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the rest of the code setting objCDONTS=Server.CreateObject("CDONTS.NewMail") and then manipulating its properties. Do I need to somehow set IIS5 to make objCDONTS.Send work?
3
1846
by: DavidS | last post by:
Have parent.aspx from which I open Driver.aspx form via button on parent.aspx. When I first open the modal dialog, the driver.aspx Page_Load function is called. After I close the dialog, then reopen the form again by clicking the button control from the parent - the Page_Load function is not called. parent.aspx <script block> function UpdD(title) { var iParms=new Object(); iParms.DlgTitle=title+"Driver Profile"; iParms.DlgW="320px";...
0
1625
by: Itai | last post by:
Background: I have four Web Form pages with respective C# code behind files, all in the same project: localhost/vpath1 Page1.aspx Page2.aspx
5
3162
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits CommonPageBase - Contains myPage which inherits PageBase Each of these classes overrides OnInit and ties an event handler
3
1148
by: msnews.microsoft.com | last post by:
Hello I was wondering if someone could help. I have setup Membership login with a ASP.NET 2.0 login control. All works, but I want to do some extra formatting before showing the page. I inserted a code behind with a Page_load routing. But the routing does not execute, its like it is completely ignored. Is this by design? Thanks.
1
2963
by: rockdale | last post by:
Hi, I have a masterpage and on the page_load event I Populate my mainmenu from database. I the page_load event of my content, I am trying to programmly select the menuitem that represent current content page, but as you know, the page_load event is fired backward, the content page_load fires first then followed by the master page page_load, I could not get the mainmenu in the content page( have not been initialized since
2
1074
by: NorbertH | last post by:
Hi, I am stucked in the following problem: I am using some Ajax (javascript) code and I call via xmlhttprequest an aspx File. In the code-behind aspx.vb file, I am creating an XML and want to send it back. Now, as soon as I remove all the html-tags (because I don't need it for xml) in the aspx file (except the first line e.g. "<%@ Page Language="VB" AutoEventWireup="true" CodeFile="some_main.aspx.vb"
1
5027
by: Lennart | last post by:
While investigating deadlocks in an application I wrote a function to check if there where any batchjobs running in parallell at the time of the deadlocks. The check runs surprisingly fast, but If I narrow the searchspace I start getting SQL0437W with reason code 3 "Optimizer cost underflow". Statistics are up to date on the table. Is this something to worry about, or can the warning be ignored? /Lennart
1
1273
by: DR | last post by:
for some reason webbrowser1.Navigate() works but causes thread to terminate, i want to do a GetElementyByID in the same thread that executes the navigate.. i am totaly stumped: http://rafb.net/p/LO2X6X82.html
0
8888
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.