Summary:

In this assignment you will practice the use of data-bound controls, master-child control relationships, and database coding.

You will develop a website that uses the Halloween Stores database to list products according to the selected category, allow the user to edit those products, and allow the user to add new products. See the next page for a sample screenshot.

Although points are determined according to difficulty/effort for each task, be aware that skipping a task will likely affect the rest of the program.

Specifications:

Using the Halloween.MDF that is provided, create an ASP.NET WebForms website using C#..

Contains 1 page, Default.aspx

Add a DropDownList control and a SqlDataSource to list all categories from the Halloween Store database (Halloween.MDF). The DropDownLists DataValueField will use the CategoryID and the ShortName will be shown.

Add a GridView to show all the products for the selected category, except for CategoryID and ImageFile. Youll need to create a 2nd SqlDataSource for the GridView.

All the GridView fields should be editable and the GridView should allow deletions.

When the user selects a category, the GridView will show the products for that category.

The page will also allow adding new products to the database. For this, add TextBoxes for each of the fields for a product.

NOTES: Use the existing DropDownList for the category. Items are added to the category that is currently selected.

You do not need a field for ImageFile.

Add a Button to save the data to the database, and write the code you need to save the data.

NOTE: You may not use a DetailsView or any other data-bound control to insert the data for you. You must write code only. However, you can configure and use the data source for the GridView to insert your data. see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.