OK then. Hopefully here is the consistent version of the try it out on Page 14-15 of the C# book. I'm going to assume that we're all using c:\BegASPNET2 as the root directory for all the stuff you've downloaded. So that's the folder you extract your download to. If you click into it, you should see three subfolders.
C:\BegASPNET2\Begin - the code you need to follow the chapters with.
C:\BegASPNET2\End - the code you should end up with by the end of the chapter.
C:\BegASPNET2\WroxUnited - the code for the entire wroxunited site.
I believe the reason that c:\websites is used in this example is that this is the directory both the authors and Microsoft suggest you use to create new web sites in. The starter code for you in c:\begaspnet2\begin\chapter01 is just two text files containing text for the two pages you create in this example. Bearing that in mind you need to create your own website.
1. Open VWD. Choose Menu > File > New Web Site. Select the template for an ASP.NET Web Site and locate it located in the File System at C:\Websites\Chapter01\. VWD aill automatically create this directory for oyu if you haven't already created it. Make sure the Language choice list is set to C#. Click OK. VWD will generate a few basic files for you - a folder named App_Data, a page named Default.aspx, and (if you expand Default.aspx) a file named Default.aspx.cs, which will hold code for the default page - and you should see a list of those new contents in your folder on the right side of the screen in the Solution Explorer. If not, choose View > Solution Explorer to make it appear.
2. In the center of VWD you will see a space for editing pages with the Default.aspx page opened. Note in the bottom-left of that window are two tabs called Design and Source. Click each in turn to observe the code and the results of the code. When in Design View, click the page and type the simple text Home Page. Press Ctrl+S to save.
3. Create a folder for images in your website by going to your Solution Explorer and right-clicking the root of your site (this will show as c:\websites\Chapter01) and then clicking "New Folder". Rename the new folder "Images".
4. Note that VWD's Solution Explorer provides the same view as Windows Explorer but only for the directory containing the website you're working on. If you opened Windows Explorer and navigated to c:\websites\Chapter01 you'd see all the files that VWD has just generated in there.
5. Back in VWD, right-click your new Images folder and click "Add Existing Item". Browse to C:\BegASPNET2\WroxUnited\Images and select all the images. Click Add to actually copy those images from the download folder to your siteâs image folder.
6. Now to create your first new page containing the history of Wrox United. Right-click the root of the site in Solution Explorer(marked as C:\websites\Chapter01) and select Add New Item from the menu. Select the Web Form template in the dialog that appears and change the name from "default2.aspx" to "history.aspx". Leave the other settings as they are and click Add. The new page is generated and the basic HTML for the page is shown in VWD.
7. Click "Design" at the bottom of the window showing the new page to switch to Design View. At the bottom there's no content for history.aspx so the page itself is blank. You could type in some text if you like, but we've prepared some already which you'll find in c:\begaspnet2\begin\chapter01\history.txt. Open history.txt in notepad or some other text editor and copy and paste the text into history.aspx.
8. Repeat Step 7 for a Mishaps page, whose contents come from c:\begaspnet2\begin\chapter01\mishaps.txt.
Dan Maharry
Read the feed at
http://feeds.feedburner.com/dansarchive