Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6934069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:54:47+00:00 2026-05-27T11:54:47+00:00

I see some people are using Page_Load and Page_PreRender in same aspx page. Can

  • 0

I see some people are using Page_Load and Page_PreRender in same aspx page. Can I exactly know why do we need to invoke both the methods in same asp.net page?

Please see the code below,

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            dprPager.ButtonClickPager += new EventHandler(dprPager_ButtonClickPager);

            if (!Page.IsPostBack)
            {
              InitPager();

            }
        }
        catch (Exception ex)
        {

        }

    }

    protected void Page_PreRender(object sender, EventArgs e)
    {
        erMsg.Visible = !string.IsNullOrEmpty(lblError.Text);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:54:48+00:00Added an answer on May 27, 2026 at 11:54 am

    It depends on your requirements.

    Page Load : Perform actions common to all requests, such as setting up a database query. At this point, server controls in the tree are created and initialized, the state is restored, and form controls reflect client-side data. See Handling Inherited Events.

    Prerender :Perform any updates before the output is rendered. Any changes made to the state of the control in the prerender phase can be saved, while changes made in the rendering phase are lost. See Handling Inherited Events.

    Reference: Control Execution Lifecycle MSDN

    Try to read about

    ASP.NET Page Life Cycle Overview ASP.NET

    Control Execution Lifecycle

    Regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at examples about socket programming, we can see that some people use AF_INET
I see some people write: //wordList is List<string> wordList.ForEach(delegate(string word){ Console.WriteLine(word);}); instead of: foreach(string
What does {Binding Path=.} mean in a WPF binding? I see some people use
Some people want to see the DB structure and dont have VS, is there
I see some frameworks like Django using unicode all over the place so it
I see some apps like 'Lock Calendar' that include this feature, and I know
I can see some options available: 1) Use PEAR's POP3 class --> tried it,
I'm building a web app that many people will be using at the same
I'd like to know what can be done in a browser UI (using a
I see some resources for gcc, but not for Visual Studio. Anyone have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.