ASP.NET Page.OnLoad executes twice

前端 未结 5 1594
轻奢々
轻奢々 2020-12-31 19:46

Anyone have any idea when and why Page.OnLoad() executes twice in the ASP.NET lifecicle?

5条回答
  •  礼貌的吻别
    2020-12-31 20:23

    Do you have any controls with AutoPostBack set to true ? That will cause the Page object to be recreated and therefore the PageLoad method will execute again.

提交回复
热议问题