CSE686 - Internet Programming Summer 2004


Partitioning ASP.NET Applications with User Controls




Quote of the day:


Whether you think that you can, or that you can't, you are usually right.


This application is composed of three parts:
  1. partition.aspx
    The presentation part of the application. This is written in a mix of html and C# script. It provides the screen contents you are now reading.

  2. NavBar.ascx
    This is a user control which, in this case, is entirely html markup. It implements a navigation bar, that in this example, just connects to this file and to class.aspx.

  3. Quotes.cs
    a C# file that implements a Quoter class. This was created as a console application. When it was functioning correctly, I copied the source file into a bin sub-directory and compiled it using the command: csc /t:library Quotes.cs. Asp sees the Import namespace directive and loads the dll for use in partition.aspx.