Completing the Source Code for the dgCustomers_Update Event Handler

Now that we have created the function to update the Customers database table for a particular customer, we are ready to complete the source code portion for the dgCustomers_Update event handler. Before we can update the database table, we must first retrieve the values entered into the textboxes by the user. Furthermore, we must determine the value of the Customer ID column for the edited row.

In previous examples we've been able to reference the value of a TextBox Web control by simply doing

						TextBoxID.Text

However, for the editable row we don't know the ID of the various TextBoxes. All we have to work with is a reference to the row being edited. Fortunately, this row has a ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.