Page_Load is firing twice in ASP.NET page

前端 未结 16 1492
闹比i
闹比i 2020-12-08 09:57

Asp.net page_load function is loading twice.. hence it affects my page performance. Does anyone know the reason it is loading twice.

No, iam not calling the page loa

16条回答
  •  醉梦人生
    2020-12-08 10:22

    For me I could get around this calling multiple times by using the PreRender event instead

    protected override void OnPreRender(EventArgs e)

    This is only called once, even if the onload's and init's are called a million times.

提交回复
热议问题