www.webdeveloper.com
Results 1 to 7 of 7

Thread: Page_Load not firing

  1. #1
    Join Date
    Aug 2008
    Posts
    37

    Page_Load not firing

    Hello,

    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!

    Thanks.

  2. #2
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    You have compiled everything right? Are you running this locally or remotely?
    Ryan Butler

    Ryan Butler.org

  3. #3
    Join Date
    Aug 2008
    Posts
    37
    Yes, I've compiled everything. I'm running this locally for now.

  4. #4
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    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?
    Ryan Butler

    Ryan Butler.org

  5. #5
    Join Date
    Aug 2008
    Posts
    37
    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.

  6. #6
    Join Date
    Aug 2008
    Posts
    37
    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?

  7. #7
    Join Date
    Dec 2009
    Location
    Austin, TX
    Posts
    1

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles