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 6337853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:19:51+00:00 2026-05-24T19:19:51+00:00

What happens when default.aspx page is requested for the first time? .net is pure

  • 0

What happens when default.aspx page is requested for the first time?

.net is pure a pure Object Oriented Framework.

_default is a class which extends Page.

Without instantiating, Pre-Init,Init,Load cannot be called.
So How _default class is instantiated?
Who is responsible for that?

I want to know very detailed technical steps?

Pleasa clarify!

  • 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-24T19:19:51+00:00Added an answer on May 24, 2026 at 7:19 pm

    The ASP.Net framework identifies that the request is for the page default.aspx and examines the markup of the corresponding .aspx file – using this it generates a class based on that markup. The base class for that class is identified in the @Page directive:

    <%@ Page ... Inherits="WebApplication1._Default" %>
    

    It then creates an instance of that generated type – this type inherits from the given base class, in this case WebApplication1._Default.

    The ASP.Net framework doesn’t normally (ever?) directly create an instance of your “code behind” class.

    You can see this for yourself by debugging a simple web application:

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // default_asp NOT _Default as you might expect
            string typeName = this.GetType().Name;
        }
    }
    

    This explains why event handlers only need to be marked as protected instead of public.

    If you are really keen you can get the path to the generated assembly using this.GetType().Assembly.CodeBase, make a copy of that file and inspect the generated class in something like IL Spy.

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

Sidebar

Related Questions

In my asp .net C# project I have a page defualt.aspx on which I
What happens in the memory when a class instantiates the following object? public class
When you create an aspx page as this one: <%@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs
For the first time I am using ajax with asp.net. There for I am
I have an asp page (Default.aspx) that displays the diff between two text files.
IIS6, ASP.NET 2.0, No Forms Authentication I'm calling Response.Redirect(~/foo.aspx), but the default document (Default.aspx)
We're using the standard ASP.NET authentication provider (AspNetSqlMembershipProvider as it happens) and the defualt
It happens lot of the time that when you report a bug to a
I have created a new VS2008 ASP.Net Web service project, with the default name
I have a form default.aspx with a scriptmanager and webpart manager. I have 4

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.