How to Develop a One-Page Web Application - How to add folders and files to a web site
(Page 3 of 4 )
Right after you start a new web site, it often makes sense to add any other folders and existing files that the application is going to require. To do that, you can use the shortcut menus for the project or its folders in the Solution Explorer as shown in figure 2-3. As you can see, this menu provides a New Folder command as well as an Add Existing Item command.
For the Future Value application, I first added a folder named Images. To do that, I right-clicked on the project at the top of the Solution Explorer, chose the New Folder command, and entered the name for the folder. Then, I added an existing image file named MurachLogo.jpg to the Images folder. To do that, I right-clicked on the folder, chose Add Existing Item, and then selected the file from the dialog box that was displayed.
Those are the only other folders and files that I needed for the Future Value application, but often you’ll need others. For instance, the application in the next chapter requires two existing business classes, an Access database, and a number of image files.
The Future Value project as a new folder is being added

Figure 2-3. How to add folders and files to a web site
How to add a folder to a web site
- To add a standard folder, right-click on the project or folder you want to add the folder to in the Solution Explorer and choose New Folder. Then, type a name for the folder and press Enter.
- To add a special ASP.NET folder, right-click on the project in the Solution Explorer and choose Add ASP.NET Folder. Then, select the folder from the list that’s displayed.
How to add an existing item to a web site
- In the Solution Explorer, right-click on the project or on the folder that you want to add an existing item to. Then, select Add Existing Item and respond to the resulting dialog box.
Description - When you create a new web form, Visual Studio generates the starting HTML for the form and displays it in Source view of the Web Forms Designer.
- Before you start designing the first web form of the application, you can use the Solution Explorer to add any other folders or files to the web site.
Next: How to open or close an existing web site >>
More ASP.NET Articles
More By Murach Publishing
|
This article is excerpted from the book Murach's ASP.NET 2.0 Web Programming with VB2005, written by Doug Lowe (Murach, 2006; ISBN: 1890774324). Check it out today at your favorite bookstore. Buy this book now.
|
|