Workshop
Quiz
- There are two local and two remote techniques through which a website can be created or opened. What are these four techniques?
- True or False: IIS stands for Internet Information Service and is Microsoft’s web server software.
- True or False: The ASP.NET Development Web Server and IIS are the same thing.
- When you’re adding a new Web Form (ASP.NET page) to your website, there’s a check box titled Place Source Code in a Separate File. How will the created ASP.NET page differ if you don’t check this option versus if you do?
- What are the advantages and disadvantages of having absolute positioned Web controls and HTML elements?
Answers
The two local techniques are through the local file system or through a local version of IIS, Microsoft’s web server software. (Keep in mind that in order for you to use the local IIS option, your personal computer must have IIS installed. IIS is not installable on Windows XP Home edition, and, even if your operating system supports IIS, it might not currently be installed.) The two remote techniques are through HTTP or FTP. If you are using a web-hosting company, talk to the company to determine which approach to use and the various settings to use.
True.
False. IIS is Microsoft’s professional grade web server software. ASP.NET Development Web Server is a lightweight web server that ships with Visual Web Developer to enable those who do not have IIS installed to be able to still develop, build, and test ASP.NET applications. IIS is designed to run real-world websites; the ASP.NET Development Web Server is designed solely for local-only, low-stress testing.
If you do not check the Place Source Code in a Separate File check box, only one file will be created for the ASP.NET page, PageName.aspx. Your source code portion will need to be placed within a server-side <script> block. Preferably, you’ll check the Place Source Code in a Separate File check box, in which case two files will be created: PageName.aspx and PageName.aspx.vb. In this scenario, the HTML markup and Web control syntax resides in the former file, while the source code portion resides in the latter.
Absolute positioned elements have the advantage that they’re easy to place on a page: You simply drag and drop from the Design view. The disadvantage is that using absolute positioning makes implicit assumptions about the end user’s screen resolution. Since you, as the developer, are laying out the site according to your screen’s resolution, the results may look good for visitors who use a similar resolution but will likely look "off" for those visitors who use a much lower or higher resolution.
Additionally, absolute positioned elements that can grow dynamically based on the data bound to them have an annoying knack of consuming more screen real estate than originally estimated, thereby potentially overlapping any elements beneath it.
Exercises
For more practice with Visual Web Developer, take a moment to create a new website. Along with the Default.aspx page, add some additional ASP.NET pages. In each page, add various content through the Design view or Source view, much like we did in the preceding hour. Tinker around with the editor, not worrying about whether you’re doing things right or wrong. Just experiment.
After creating a couple of pages, try marking each page as the start page (right-click on the ASP.NET page in the Solution Explorer and choose Set as Start Page) and then visit the page in a browser by going to the Debug menu and choosing Start Without Debugging.
If you’re feeling adventurous, try adding some image files from your hard drive to your website. Next, have them displayed in your ASP.NET pages using Image Web controls, much like we did in the preceding hour. Again, focus more on the exploration than whether you are doing things the right way. Take your time and have fun; it’s the best way to learn!