spacer
Yehuda Shiran August 11, 2002
Compiling Hello World's Code Behind Version
Tips: August 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

One of the advantages of Code Behind is that the .NET framework compiles it automatically, when it detects a need for it. This need arises when the source code is fresher than the corresponding binary file. Sometimes, though, you need to know how to compile your Code Behind code by yourself. It will give you a great insight into how the .NET framework works. Once you have your code written, the next step is to compile it into a dll file in the bin directory underneath the working directory where you keep your code. When the Web server displays an ASP.NET page (.aspx), it searches all dll files in the bin directory for the namespaces that the ASP.NET page requires. When compiling the JScript .NET page (for example helloworld.aspx.js), you need to instruct the compiler to put the dll file in the bin directory:

  jsc /t:library /out:bin\codebehind.dll helloworld.aspx.js
The name of the dll file is not that important, because the Web server searches all dll files for the required namespace. The following Command Prompt window shows the code listing and the compilation stage:

To learn more about JScript .NET and ASP.NET, go to Column 115, JScript .NET, Part IX: Code Behind.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Creating a Banking Application Deposit Script · Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
XPath Support for Working with XML Data in MySQL · SSDs Take Center Stage · WebPlus X4 Adds New Features for Easy Site Design