Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. The Web Forms Model > Setting Up ASP.NET Applications - Pg. 27

The Web Forms Model 27 Setting Up ASP.NET Applications To create an ASP.NET application, you need very few ingredients--pages, assemblies, a virtual directory, and maybe some ancillary files to provide for initialization and configuration. Once every- thing is in place and the virtual directory is properly set up, to test the application you simply point the browser to the URL of the application's main page. What you need to do to build a Web appli- cation is quite different from what you need to do to build, say, a Windows Forms application. In spite of these structural differences, Visual Studio .NET manages to unify the working model and successfully brings the familiar rapid application development (RAD) approach to the Web. Much better than its Web predecessor--Visual InterDev--Visual Studio .NET lets you create ASP.NET pages as Web-based visual forms. You work on an empty surface that mimics the body of an HTML page and populate it with server controls picked from a palette of components. Once dropped on the Web form, the control can be configured using the Properties browser and moved around as appropriate. To handle the events fired by the control, you just select the event from a list or double-click the control in the designer area. If you find that all this eerily resembles the Visual Basic way of working, well, it's not coincidental! Creating a Visual Studio Project When you create a new ASP.NET application with Visual Studio .NET, you specify a virtual path, not a physical directory. You pass Visual Studio .NET the URL of the virtual directory in which the project files are to be created. As shown in Figure 1-5, you also select the language for the project. Visual Studio .NET lets you create ASP.NET applications only in Visual Basic .NET and C#. (You can use J# only if you have installed the version 1.1 of the .NET Framework along with Visual Studio .NET 2003.) Figure 1-5. Starting a new ASP.NET project with Visual Studio .NET 2003.