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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint