Microsoft ASP.NET
Basic programming using VB exercise
Relatively easy

This Microsoft ASP.NET BASIC PROGRAMMING USING VB exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl ASP.NET 2.0 USING VB course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Squaring numbers - VB and data types

A full answer to this exercise is provided as part of the training course!

1) Create a form called frmSquare.aspx to allow you to input a number:
Exercise screen-shot 1605 A basic version of the form
2) Attach code to the Show square command button so that when you click on it ASP.NET:
  • reads the number entered into a variable of type Int32 (use Convert.ToInt32 to convert the data type)
  • stores the square of this number in another variable
  • displays the result of this as text
3) Here is a typical result from running the form:
Exercise screen-shot 1606 The square is displayed as a previously hidden label
4) Save and close any open files.

Thank you for showing an interest in this ASP.NET 2.0 using VB training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..