Stacker
Stacker

Reputation: 8237

Asp.Net Page Load

i have a weird problem ! i have ASP.NET website and i have a page with page_load which never get executedno matter what i do ,i deleted the page_load and doubled clicked the aspx page it generated page_load again i inserted my code inside and made breakpoint but it never get hit !

All other Methods gets hit normal like button click and gridview events etc.

ASP.NET 4

it only happens with this page only.

any one ever faced this weird problem ?

Upvotes: 0

Views: 245

Answers (1)

Tomasi
Tomasi

Reputation: 2509

Only logical cause for you problem is that AutoEventWireup directive is set to false. Either on the page or in the web.config.

Alternatively you could use this code:

protected override void OnLoad(EventArgs e)
{
  base.OnLoad(e);

  //Do your stuff
}

Upvotes: 4

Related Questions