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

  • Home
  • SEARCH
  • 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 8457085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:43:04+00:00 2026-06-10T12:43:04+00:00

I want to bind to the Page PreRender method on at the global.asax level,

  • 0

I want to bind to the Page PreRender method on at the global.asax level, but for some reason the method is never getting called. My method looks like:

    protected void Page_PreRender(object source, EventArgs e)
    {
        /* do stuff */
    }

Am I able to call Page events like this in Global.asax?

  • 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-06-10T12:43:06+00:00Added an answer on June 10, 2026 at 12:43 pm

    The global.asax is derived from HttpApplication class and not contain the Page_PreRender event as you can see on the MSDN reference:

    http://msdn.microsoft.com/en-us/library/system.web.httpapplication(VS.90).aspx

    If you want to globally capture the PreRender event you can make a different base class for the System.Web.UI.Page, overwrite this event, and use this class to your pages.

    For example

    public abstract class BasePage : System.Web.UI.Page
    {
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
        }
    }
    

    and use the BasePage on your pages

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

Sidebar

Related Questions

I want to bind a function to an event but I want to change
I want to bind a string value to a text box but only if
I want to bind one property to multiple sources. My reason for this are
Suppose in .aspx page their is dropdown in which i want to bind two
I Want to bind detailsview to the page manually , for example I Have
Let's say we want to bind an event listener on a page other than
I want to bind my Listview but I can't. I dont know what I
I have this code in the page load...For some reason the dropdown binds to
I have bind an event on submit form on a login page. I want
I want to show some news posts on the front page of a website.

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.