[solved]-Create Page Delete 1 Record Create Pages Display Data Store Database Folder Deleteproducts Q39060213
Create the page to delete 1 record.
- Create the pages to display your data and store them in theDatabase folder: DeleteProducts.aspx
- Make sure to use the master page!
- In the page, manually delete the data rows.
Step 1. The user needs a way to indicate which record todelete
Again, format the table element using the properties window inVisual Studio, or use skins or a stylesheet. It’s up to you to makethe table look good. You will need to have some way to identify’which’ record to delete. In the sample you have aDropDownList control to allow the user to selectthe record they want to delete. You can use other control typessuch as radiobuttonlist.
- AutoPostBack allows them to delete a record byselecting a record without a submit button.
- Although you can use a submit button use AutoPostback. Set theproperty to true for the dropdownlistcontrol.
Step 2. Use functions to show 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 otherlesson pages. Show the data before and after the data isupdated.
- If the user has not been on the page, show thedata.
- Use the same process to display the records in thetable and dropdown list but store it in separatefunctions. It’s easier if you have different functions fordisplaying and deleting data. (You can make it one, but you have touse different connection, command and reader objects which can getmessy for beginners.)
Step 3. Use functions to delete the data and update the datadisplayed
- When the user changes the dropdown list selecteditem, the value of that item is passed tothe SelectedIndexChanged eventhandler.
- Call the deleteCategories method to delete therecord.
- After, when the data is deleted, display a messageshowing that the data is deleted. You can call otherfunctions which allow you to see the updatedrecords. Or, you can provide a link back to the displaypage to ‘view’ that the data was deleted.
Expert Answer
Answer to Create the page to delete 1 record. Create the pages to display your data and store them in the Database folder: DeleteP… . . .
OR

