500pts: AutoEventFireup launches PAGE_LOAD twice with some of my pages, why?
Posted on 2006-05-29
Can anyone help?
I have been having a problem with some pages that i imported into visual studio 2005 from vs 2003....
They were running page_load twice but i did manage fix it ... i set the AutoEventFireUp to false... and it works...
Page_load now launches once... So i thought i would ensure a new page that i create also works and fires the Page_Load event...
So i set a new page to false BUT now page_load never fires... Which i believe is the way it is supposed to work.
So my question is... why do my imported pages still fire the events when set to autoEventFireup false....
I can't see any real major differences that would cause this although i have spotted this method..
override protected void OnInit(EventArgs e)
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
but i did comment out the code and the imported page with autoeventfireup set to false still fires ...
Can anyone help..... I want the imported pages to work the same as a new one....
I can put up the source.. It isn't big, one of them is an error page so it isn't big..
I checked this in the page and currently it contains this
<%@ Page language="c#" Codebehind="error.aspx.cs" AutoEventWireup="False" Inherits="IGAPP.error" %>
hence the it uses codebehind rather than codefile - although I did try changing it to codefile.... i got an error
Thanks in advance for any help.