P
Phil Johnson
Hi, I am working on an application with around 800 pages.
It was an asp.net 1.1 application with all the pages having AutoEventWireup
set to False and the events hooked up in the code behind.
The pages all inherit from a base class we called PageBase.cs which also has
a load and unload event handler that gets wired up inside it which runs on
every page's load and unload as well.
We upgraded the application to a 3.5 application and that seemed to set the
AutoEventWireup to true on most pages and pull out the event wireups from the
code behind. Now about 600 pages have the AutoEventWireup set to True and
200 have it set to false.
The problem I have is that on the pages where it is set to true, the load
and unload events in the page base fire twice.
Is there any way we can get around this issue?
One thing I will try is changing the name of the event handlers in the
PageBase.cs class so the autoeventwireup doesn't affect them and still hook
them up manually.
Any other ideas that might work?
Or any getarounds?
Ideally, does anybody know of an automated way to replace the
autoeventwireups with explicit event hookups? Resharper or Refactor or
another tool?
Thanks
It was an asp.net 1.1 application with all the pages having AutoEventWireup
set to False and the events hooked up in the code behind.
The pages all inherit from a base class we called PageBase.cs which also has
a load and unload event handler that gets wired up inside it which runs on
every page's load and unload as well.
We upgraded the application to a 3.5 application and that seemed to set the
AutoEventWireup to true on most pages and pull out the event wireups from the
code behind. Now about 600 pages have the AutoEventWireup set to True and
200 have it set to false.
The problem I have is that on the pages where it is set to true, the load
and unload events in the page base fire twice.
Is there any way we can get around this issue?
One thing I will try is changing the name of the event handlers in the
PageBase.cs class so the autoeventwireup doesn't affect them and still hook
them up manually.
Any other ideas that might work?
Or any getarounds?
Ideally, does anybody know of an automated way to replace the
autoeventwireups with explicit event hookups? Resharper or Refactor or
another tool?
Thanks