Note the following Import directive at the top of the page that specifies the namespace to include. Once the namespace is included using this directive,
the class may be used from within the Web Form. Because the assembly is pre-loaded by the ASP+ runtime, only
a simple namespace import is required to make the component available.
<p>
<div class="code"><pre>
<%@ Import Namespace="HelloWorld" %>
</pre></div>
<p>
By default, ASP+ loads all assemblies from the /bin directory when the application is started. The assemblies to load are specifed via
the configuration system (see the <a href="configoverview.aspx">Configuration Overview</a> section for more detail). Additional
assemblies may be imported into an application using configuration as well. For example:
<p>
<div class="code"><pre>
<configuration>
<compilation>
<assemblies>
<!--The following assemblies are loaded explicitly from the global cache-->
<add assembly="System.Data"/>
<add assembly="System.Web.Services"/>
<add assembly="System.Drawing"/>
<!--This tells ASP+ to load all assemblies from /bin-->
<add assembly="*"/>
</assemblies>
</compilation>
</configuration>
</pre></div>
<b>Note: </b> Each assembly loaded from /bin is limited in scope to the application in which it is running. This means that peer applications could
potentially use different assemblies with the same class or namespace names, without conflicting.
<!--BEGIN SECTION-->
<br>
<a name="twotier">
<br>
<span class="subhead">A Simple Two-Tier Web Form</span>
<p>
The classic use for an external component is to perform data access. This simplifies the code in your page, improving readability and
separating your user interface (UI) logic from the backend functionality. The following example demonstrates a simple
two-tiered Web Form using a data access component to retrieve product information.
<li>The ASP+ runtime finds business objects (local assemblies) in a well-known /bin directory, directly under the application root. The /bin directory offers the following advantages: <p>
<ul>
<li><b>No Registration Required.</b> No registration is required to make an assembly available to pages in the application. It is available by virtue of its location in the /bin directory. Compiled code can be deployed by simply copying or FTP'ing to this location.
<li><b>No Server Restart Required.</b> When any part of an ASP+ application is changed (for example, replacing a .dll in /bin), new requests immediately begin execution against the changed file(s). Currently executing requests are allowed to complete before the old application is gracefully torn down. The web server does not require a restart when you change your application, even when replacing compiled code.
<li><b>No Namespace Conflicts.</b> Each assembly loaded from /bin is limited in scope to the application in which it is running. This means that peer applications could potentially use different assemblies with the same class or namespace names, without conflicting.
</ul>
<p>
<li>Classes in an assembly are made available to a page in the application using an Import directive within the aspx file.
<li>Two-tiered applications simplify the code in a page, improving readability and separating user interface (UI) logic
from backend functionality.
<li>Three-tiered applications extend the two-tiered model to enable UI developers to work with a higher level of abstraction. The middle
business component typically enforces business rules and ensures that the relationships and primary key restraints of the database are