Page Load event occurs on Button Click event

Recommended Answers

All 2 Replies

Page Load event occurs on Button Click event

What is the point here? Page lifecycle events namely - init, load, pre-render etc must be executed when you request page. Please read ASP.NET Page lifecycle posts from MSDN.

Are you talking initial page load or after a post back? You can seperate post back and intial load by:

if(!IsPostBack)
{
    First page load;
    }

if(IsPostBack)
{
    Any page postback, but not the intial one;
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.