Exercise: Multiselect listbox for film categories

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

The answer to the exercise will be included and explained if you attend the Wise Owl course listed below!

Category ==> ASP.NET webforms - C#  (25 exercises)
Topic ==> DropDownLists and ListBoxes  (2 exercises)
Level ==> Average difficulty
Course ==> ASP.NET webforms - C#
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Create a new website, and add the files in the folder shown above into it.

When you browse the page frmFilmEntry.aspx, you should see that it allows you to type in a film name and rating (do this correctly - the form doesn't contain any validation).

Add a multi-select listbox to your form showing categories of your choice, to look something like this:

ASP.NET 4.0 - C# exercise - DropDownLists and ListBoxes (image 1)

When you click on the CONTINUE button, you see the data you've chosen in the form

Your code should display an error if a user doesn't choose any categories:

ASP.NET 4.0 - C# exercise - DropDownLists and ListBoxes (image 2)

What you should see if you don't select any categories

Test that your form works, then close it down.

This page has 0 threads Add post