CS 351: Program 2
Student Learning Objectives
- Use ASP.NET and Visual Studio to demonstrate the use of
- Validation Server Controls in a Web Form
- Redirection to another Web page upon button click
- Regular expressions to validate user input
Validate your code to XHTML 1.0 Transitional Standards and remove any glaring accessibility errors.
Assignment
- Create a new folder
U:\Programs\nnProgram2. This folder should contain the file: Default.aspx
- Use Visual Studio 2005 to create a ASP.NET Web form to accept and validate user input (see validation rules below)
- Once the page contains legal input, the Sign Me Up button should redirect the browser to the CWU home page (www.cwu.edu)
- Implement a Clear Button to clear the input widgets and any corresponding error messages
- Duplicate the form layout shown in the Program 2 screen snapshots shown below using CSS tableless layout
Validation Rules
- User ID: Required. Must be between 3 to 10 characters in length. May contain only letters, numbers, and the '_' (underscore) character
- Password: Required. Must be at least 6 characters in length and no more than 25 characters. Must contain at least one letter and one number
- Re-enter Password: Required. Must be an exact match with Password
- Email Address: Required. Must be in the form aaa@bbb.ccc where a, b, and c may be a letter, digit, or underscore (of length one or more)
- Age: Required. Must be 21 years of age or over
- Gender: Required (male or female)
- Initials: Optional. Only uppercase letters allowed. Must be exactly 2 or 3 letters in length
- Last Name: Optional. May contain only letters. Maximum length is 15 letters
To Receive Credit
- This program is due at the start of the next Lab (Wednesday)
- Print out
Default.aspx as displayed in a browser twice
- one with no input date and all the required field error messages displaying
- one with a random sample of the other error messages
- Annotate your printout to note
- Any problems that remain in your solution (to assist with grading)
- Your total completion time (rounded to the nearest half-hour)
- Save your work in U:\Programs\
nnProgram2 folder
- Your program code will be checked online
Grading Criteria
- Programs will be graded on a scale of 10 to 20:
- 20 Excellent
- All user input validates correctly with appropriate error messages
- All user input validates correctly with JavaScript disabled
- Clear button resets page controls to initial state with no error messages showing
- Form layout duplicates the Program 2 screen snapshots shown below using CSS tableless positioning
- All controls IDs are meaningful and use a consistent naming scheme
- Code validates to XHTML 1.0 transitional without warnings or errors
- CSS rules validate without warnings or errors
- All input elements have corresponding labels (access keys are not required)
- 19 Very good
- Sign Me Up and Clear buttons work correctly
- One or two minor problems with XHTML or CSS validation, control IDs, or page display
- 18, 17 Well done
- One or two problems with user input validation, error messages produced, or the clear button
- Three or four minor problems with XHTML or CSS validation, control or variable names, or page display
- 16, 15 OK
- Three or four problems remain in validating user input
- Clear button is missing or has no functionality
- Five or more minor problems with XHTML or CSS validation, control or variable names, or page display
- 14, 13 Problems
- Five or six problems remain in validating user input
- 12, 11, 10 Unsatisfactory
- Seven or more problems remain in validating user input
Screen Snapshots
Click on thumbnail for larger image