| What makes an Delphi 8 ASP.NET application | |||||||||||||||||
| Let's see what the main parts of an ASP.NET application are; what are code-behind files and what are all those .aspx, .ascx, .dcuil, bdsproj, etc. files? | |||||||||||||||||
Welcome to the third chapter of the FREE online programming course: To load the BDSWebExample into Delphi 8, first launch Delphi :) Go to File - Open Project (or click "Open Project" on the Welcome page), and locate the BDSWebExample folder (if you have followed the Course from the beginning the code should be in "C:\InetPub\WWWRoot\BDSWebExample").
![]() Locate the "BDSWebExample.bdsproj" and the "BDSWebExample.dpr" files. You can select either of them and click OK. The BDSWebExample.bdsproj is the "Borland Developer Studio Project file", this XML file is a project file containing information needed to build the project. The BDSWebExample.bdsproj in one of its nodes has a reference to "MainSource" that points to "BDSWebExample.dpr". The BDSWebExample.dpr is a standard Delphi project file. If you look inside this .dpr file, you'll note the first line: "library BDSWebExample;" - this means that every ASP.NET application compiles into a DLL (dynamic link library). We'll talk more on the purpose of the BDSWebExample.dll in the coming chapters.
BDSWebExample at a glance
We'll now take a look at the elements of a Delphi ASP.NET Web Application.When you create an empty asp.net application, Delphi creates the necessary files and folders on the server, sets the appropriate security settings for them, and creates the IIS application (virtual root, etc.). With this in mind, we could say that an ASP.NET application consists of a virtual directory in IIS and at least on ASP.NET web page ("WebForm"). Optionally, an application may also include:
Note that we will discuss every one of the above files in much more detail in the following chapters of this Course. Project Options for BDSWebExample.dllBefore we compile the BDSWebExample, let's see if all project options are properly set. Point to Project - Options (Crtl+Shift+F11) and select the "ASP.NET" tree node. The ASP.NET section of the Project Options, is used to setup debugger options for your ASP.NET application. You should see something like:![]() F9 = run and debug, Run - run without debuggingI would suggest that you now try to compile the project. Hit Ctrl+F9 ... if all goes well, there should be no errors and you can run the applications. Point to the Run menu and select "Run without debugging" ... a new IE instance should open and you'll see the startup page for the project: Default.aspx loaded in the browser. If you simply hit F9 you'll start with debugging and the Delphi IDE will show some more windows ... again, we'll deal with debugging later.That's it for this chapter. Until the next chapter you should familiarize yourself with the IDE and the WebForms (ASP.NET pages) of the BDSWebExample application. To the next chapter: A Beginner's Guide to ASP.NET Programming for Delphi developersIf you need any kind of help at this point, please post to the Delphi Programming Forum where all the questions are answered and beginners are treated as experts.A Beginner's Guide to ASP.NET Programming for Delphi developers: Next Chapter >> |
|||||||||||||||||


We'll now take a look at the elements of a Delphi ASP.NET Web Application.
