Implementation of IsPostBack in page load

后端 未结 8 1031
你的背包
你的背包 2020-12-06 00:07

The more I use ASP.NET, the more if (!IsPostBack) {} seems pointless...

First example:

For example, I just Googled an issue, they said use this

8条回答
  •  死守一世寂寞
    2020-12-06 00:48

    Your event handlers should be wired up whenever the event can be fired (irrespective of PostBack status)

    Also, when adding controls dynamically, be sure to observe the asp page lifecycle

提交回复
热议问题