Column Name N = @Parameter Value N WHERE Primary Key Column Name1 = @Primary Key Value To Update1 AND Primary Key Column Name2 = @Primary Key Value To Update2 AND ...
AND Primary Key Column Name N = @Primary Key Value To Update N , in this instance - has its value specified via the data source control's Select Parameters, which can specify a source for the parameter value.
If there are no records, the BOF and EOF property are True.
If the user clicks on the button in the "customer ID" column he or she will be taken to a new file called "demo_update.asp".
Granted, this is not that difficult to accomplish, but it isn't as easy as pointing and clicking and requires the page developer to write a bit of code. NET 2.0's data Web controls can provide an editing interface.
In this article we will look at using the Grid View control to update data, although the Data List, Details View, and Form View controls are also suitable choices.
Furthermore, the columns in the Grid View become editable, too.
In particular, Bound Fields turn into Text Box Web controls; Check Box Fields, which are displayed as unclickable checkboxes in the read-only status, become clickable.
Future installments will explore more advanced updating scenarios, such as customizing the Grid View's editing interface and programmatically setting the updated values. The UPDATE Table Name SET Column Name1 = @Parameter Value1 Column Name2 = @Parameter Value2 ...
What checking this checkbox does is add a Command Field to the Grid View's field list.