0% found this document useful (0 votes)
74 views2 pages

Lab 8: Update & Delete

This document provides instructions for updating and deleting records in a database using a web form in ASP.NET. It describes adding controls like dropdown lists and textboxes to a form named Update_Delete.aspx. It also provides code snippets to populate the dropdown with usernames from a database, update a user's details when the update button is clicked, and delete a user when the delete button is clicked. The instructions conclude by testing the completed form.

Uploaded by

james smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views2 pages

Lab 8: Update & Delete

This document provides instructions for updating and deleting records in a database using a web form in ASP.NET. It describes adding controls like dropdown lists and textboxes to a form named Update_Delete.aspx. It also provides code snippets to populate the dropdown with usernames from a database, update a user's details when the update button is clicked, and delete a user when the delete button is clicked. The instructions conclude by testing the completed form.

Uploaded by

james smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CT050-3-2 WAPP Update & Delete

Lab 8 : Update & Delete

1. Continue from last week solution, create a web form named Update_Delete.aspx as
follow:

ddlUsername

txtPassword

txtEmail

txtCountry

2. Click the Smart Tag of ddlUsername and select the checkbox “Enable
AutoPostBack”.

3. Double click on the page to go to Update_Delete.aspx.cs and enter the following code
before Page Load :
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString);

4. Type the following code in Page_Load

5. Double click ddlUsername and enter the following code:

Level 2 Asia Pacific University of Technology & Innovation Page 1 of 2


CT050-3-2 WAPP Update & Delete

6. Double click button update and enter following code:

7. Double click button delete and enter following code:

8. Finally test the page.

Level 2 Asia Pacific University of Technology & Innovation Page 2 of 2

You might also like