PreRender event does not fire

I recently noticed that the Page_PreRender event is not firing. If used protected override void OnPreRender, everything is in order. AutoWire is turned on, and the same code works fine on another computer ...

Where should I dig?

+4
source share
3 answers

There are a few things that can make it not run.

  • Visible property set to false
  • Response.End ()
+11
source

This event must be redefined and used.

protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
}
+6
source

, , AutoEventWireup Web.Config Machine.Config. http://support.microsoft.com/kb/324151

, , machine.config - .

, .

<configuration>    
<system.web>
<pages autoEventWireup="true|false" />
</system.web>
</configuration>
+1

All Articles