Page_Load not firing
I have several pages that use a master page with a code behind. I'm not sure what's going on, but when I change things in the master page codebheind, it stays the same as it was before.
I've cleared my browser cache and even tried adding a "Response.cach.setnostore();" to the page load of my master page and to a couple of content pages to see if it worked and no dice.
I've also tried debugging and setting a break at the page load of the masterpage and it doesn't even hit it.
Everything that I've searched says to set the AutoEventWireup = true and mine already says that.
Any help is much appreciated!
You have compiled everything right? Are you running this locally or remotely?
Yes, I've compiled everything. I'm running this locally for now.
What if you create a brand new master page, with a couple content pages, do you still experience the problem?
And what are you attempting to do?
I made a new master page and copied the code into it and now it works. I'm not sure why it didn't work, though. Thanks.
Ok, so I've still got a problem with the master page but I do have a clearer problem, I think.
So most of my web app was developed from a template that was given to me. I've added a lot of pages and changes but none of my pages are showing in this assembly called ESDC.web. All pages that I've created work with the new master page but the pages that came with the template don't. On those pages I get an error that says: "Unable to cast object of type 'ASP.masterpage_master' to type 'MasterPage".
I think that if I could add the new MasterPage somehow to this assembly it will work properly. Any ideas?
I had this problem and solved it
I too was dumbfounded by this and went through pretty much the exact same steps. I had two placeholders on my master page and the Page_Load was being called for one of the content pages but not the other. After trying every which way I finally cleared the .NET assembly cache. This did the trick. Clearly there is some dependency buy that Visual Web Develeoper / ASP platform is not handling correctly. The cache can be found here on Windows 7 / Vista - c:\Users\UserName\AppData\Local\Microsoft\WebsiteCache
and here on XP C:\Documents and Settings\UserName\Local Settings\Application Data\Microsoft\WebsiteCache.
I just deleted the WebSiteCache directory altogether.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)