Question
Visual Studio C# ASP.net Step 1. Create the folders and configuration files. Make sure you finished importing images for your categories and products table in
Visual Studio C# ASP.net
Step 1. Create the folders and configuration files.
Make sure you finished importing images for your categories and products table in the Images folder from last week.
Make sure you have completed the discussion assignment where you created the connection string in the web.config file.
Create a folder called Database in your project.
Create a web.config file and place it in the database folder.
Write the code to limit access to this folder to deny all users except allow authenticated user, which is the student account you created earlier.
Step 2. Displaying Data
Create the pages to display your data and store them in the Database folder: DisplayCategories.aspx, DisplayCustomers.aspx, DisplayProducts.aspx, DisplayLogs.aspx, DisplayOrders.aspx.
Make sure to use the master page!
In each page, manually display all of the data using tables.
Review the example for the my categories table. You will have to make sure you have all your fields and variables matching your code!
The example used an image element to display the image. You can use other elements too. For example, if you have a yes/no field you could use a checkbox and indicate yes with a check. You could create a link to a web page or a link for their email address! Have fun. Review your textbook for other examples of how you can enhance the page.
Notice you can format the table element using the properties window in Visual Studio, or use skins or a stylesheet. It's up to you to make the table look good.
Tips
You may need to deal with data types and formatting content such as currency. No number should go page 2 decimal places.
If you have a picture or other control you want to add, you can do this. Just create a new instance of that control (ie. Image). Then set the properties of that control dynamically (such as ImageUrl). Add the control, to the table cell Controls collection. Refer to the example.
Problem 2 Create the code to manually delete data
Create the pages to display your data and store them in the Database folder.
DeleteCategories.aspx,DeleteCustomers.aspx,DeleteProducts.aspx,DeleteLogs.aspx,DeleteOrders.aspx.
Make sure to use the master page!
In each page, manually delete the data rows using tables.
Step 1. The user needs a way to indicate which record to delete
Here is an example for the my categories table. You will have to make sure you have all your fields and variables matching your code! Again, format the table element using the properties window in Visual Studio, or use skins or a stylesheet. It's up to you to make the table look good.
Markup
You will need to have some way to identify 'which' record to delete. In the sample you have a DropDownList control to allow the user to select the record they want to delete. You can use other control types such as radiobuttonlist. AutoPostBack allows them to delete a record by selecting a record without a submit button. You can use a submit button.
Step 2. Use functions to show and delete the data
The process is similar to show the data in different controls. I've given you some steps and example to get started on the other lesson pages. It's up to YOU to create and modify your own code. Show the data before and after the data is updated.
If the user has not been on the page, show the data.
Use the same process to display the records in the table and dropdown list but store it in separate functions. It's easier if you have different functions for displaying and deleting data. (You can make it one, but you have to use different connection, command and reader objects which can get messy for beginners.)
CodeStep 3. Use functions to delete the data
When the user changes the dropdown list selected item, the value of that item is passed to the SelectedIndexChanged event handler. Call the deleteCategories method to delete the record. After, Call the other two functions which allow you to see the updated records.
Problem 3 Create the code to manually insert data
Create the pages to display your data and store them in the Database folder: InsertCategories.aspx,InsertCustomers.aspx,InsertProducts.aspx,InsertLogs.aspx,InsertOrders.aspx.
Make sure to use the master page!
In each page, manually delete the data rows using tables.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started