Page Load event occurs on Button Click event

Recommended Answers

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.

Jump to Post

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.