Active Server Pages

Module 1

1.1Explain the differences between static, client-side dynamic, and server-side dynamic web pages.

1.2What is the MSIL, and what is its benefit?

1.3Why is it that when you view an .aspx page twice in succession, the second retrieval of the page is much faster than the first?

1.4What are the possible values for the BorderStyle of an ASP label control? Use the .NET Framework Class Browser or Visual Studio Help to discover the answer.

1.5Consider the following VBScript declaration:

Dim X(20) As Integer

a.How many elements are in this array?

b.What is the index of the first element in the array?

1.6For each of the following Collection types, briefly explain the capabilities and disadvantages.

a.Array

b.ArrayList

c.HashTable

d.SortedList

Module 2

2.1Write code that generates 100 random numbers in the range of 1 to 10, and counts how many of them are odd. Have the resulting count, expressed as a percentage, displayed in a label called lblOutput.

2.2Write code that uses a While loop to compute how long it will take an initial investment of $1000 to become $2000, assuming the investment grows at 8% per year. Have the result displayed in a label called lblOutput.

2.3Write a Function that takes an initial investment amount, a final investment amount, and a yearly growth rate (e.g., 0.08 for 8%), and returns the number of years it will take for the initial investment to grow to the value of the final investment. Rewrite the previous program to use this function.

2.4Write the Function from the previous question as a Sub, with an additional parameter: the label to display the result on. Rewrite the previous program to use this Sub.

2.5What is the IsPostback test and why is it useful?

2.6Why are some events handled on the client side and some on the server side?

Investment Calculator 1.0

Create a page with three text boxes, one for an initial investment, one for a final investment amount, and one for a percentage yearly growth rate, all properly labeled. When the user fills in all three boxes and clicks a button, the number of years it takes to reach that final investment amount will be displayed. Make use of the Sub you wrote in an earlier question.

Bookstore 1.0

You are creating the home page for an online bookseller. In this first version, we are allowing the user to select a genre.

Using checkboxes and a submission button, allow the user to select from one or more of the following genres: Mystery, Romance, Action, History, Cooking, Reference. When the submit button is clicked, show the same page with the choices listed, explicitly stating if no choice has been made. That is:

You have selected the following genres: Mystery, History.

Or:

You have not selected a genre.

This is the end of Assignment 1.