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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:56:16+00:00 2026-05-11T14:56:16+00:00

Q1 – Asp.Net is able to detect when you change the original files and

  • 0

Q1 – Asp.Net is able to detect when you change the original files and automatically recompilles the application when next request arrives

A) But it appears that while with Web sites Asp.Net is able to detect changes, regardless of whether they happen in code-behind file (.cs) or in aspx file, with Web projects Asp.Net only detects changes that happen inside aspx file, but it doesn’t detect changes inside .cs files! Why is that?

B) Asp.Net also detects if any new aspx or cs files were added to the website. But, will it upon the next request compile just the added files, or will it recompile all of app’s files?

C) If an application on a web server contains several aspx files, some created by web project ( and thus their code behind files are inside single assembly ) while other aspx files were created via a website project, how is Asp.Net able to figure out whether particular aspx file has code behind contained within an assembly located in Bin directory?

Q2 “Codebehind attribute is used only by the Visual Studio Web Forms Designer. The attribute is not used at run time.”

  • I assume CodeBehind attribute is not used at runtime due to the fact that all .cs files are compiled into single assembly, and thus VS has no problem locating a class as long as aspx tells the name of the class via Inherits attribute?!

  • On the other hand, Asp.Net code behind model does need src attribute, because here cs files get compiled into separate assemblies and thus asp.net needs to know the name of the file specified by CodeFile attribute, so it can somehow figure out the name of the assembly into which this file compiled?

thanx

  • 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. 2026-05-11T14:56:16+00:00Added an answer on May 11, 2026 at 2:56 pm

    ASP.NET only looks for a code behind file if it can’t find the type it needs to complete the compilation of a ASPX in the existing assemblies. A dependancy on the code behind cs file is only created if it was needed when building the temporary assembly for the ASPX file.

    Therefore where in a web project all the codebehind cs files are compiled into a single assembly the compilation of a temporary assembly for the ASPX does not require the code behind cs, since the type(s) needed are already present in the pre-built assembly. Hence no dependancy is created between the temporary assembly and the cs file so changing the cs file does not invalidate the existing temporary assembly. Note in deployment the cs files won’t even be present.

    In a web site there is no pre-built assembly containing all the types in code-behind, hence the code-behind file is required to complete the temporary assembly for an ASPX, in turn a dependancy on the cs file is added to that temporary assembly. Hence any change to the cs file invalidates the temporary assembly.

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

Sidebar

Related Questions

So to start, I have an array of XML files. These files need to
My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this
I need to clean up various Word 'smart' characters in user input, including but
I am reading some og tags from sites but I can't seem to decode
I have a PHP application that stores PHP datetime to my MySQL table. I
I would like to count the length of a string with PHP. The string
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query
I'm struggling to position the second level of a dropdown nav menu and was
Have a webpage that will be viewed by mainly IE users, so CSS3 is
I'm trying to craft a Java regular expression to split strings of the general

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.