Precompilation confusion

  • Thread starter Thread starter Bingo
  • Start date Start date
B

Bingo

I'm confused by something to do with precompilation...

It is my understanding that if you have an sample.aspx with <%@ page
inherits="sampleNameSpace.sampleClass" %> in visual studio.net then
sample.aspx.cs will automatically be precompiled into bin\sampleProject.dll

Do you have to manually run the csharp compiler to precompile your files
or is this only if you wish to precompile specific classes?

Cheers
 
Hi

In Web Forms that use code-behind files, the @ Page directive (or @ Control
in user control files) contains attributes that specify the relationship of
the .aspx file and its code-behind file. These attribute are:

Codebehind: In Visual Studio, this attribute references the name of a file
that contains the class for the page. For example, if you create a Web Forms
page in Visual Studio called WebForm1, the Codebehind attribute will point to
WebForm1.aspx.vb or WebForm1.aspx.cs. This attribute is used only by the
Visual Studio Web Forms Designer. It tells the designer where to find the
page class so that the designer can create an instance of it for you to work
with. The attribute is not used at run time.

Inherits: Identifies the class from which the page derives. In Visual
Studio, this points to a class in the project assembly (.dll),

HTH
Ravikanth[MVP]
 
Back
Top