Objectdatasource updating input parameters
" I believe the simple answer is: it knows because of the Bind statements you put in the Text Box controls. txt Address has "Bind("Address")" so when the update is called, it has a connection between txt Address and parameter "Address" I believe this is correct.
What's really cool is when you set the Data Type Name property on the obj DS then because of these bind statements, an object with the properties assigned correctly is created for you and ready to pass to the specified update Method or insert Method. Perhaps it is simply the order in which the Text Box controls are added to the Edit Item Template? the order of the controls must match the order of the Update Parameters...
Try swapping the position of txt House Hold Name and txt Address, does the address get passed into the s Name parameter of your update method?
The Object Data Source raises an event before it performs each operation, that's when you can insert parameters (or validate/alter existing parameters).
So you might be happy to pay extra for quicker programming; but would you pay more to get less?
In this article, I ll go through other programming aspects, such as paging, sorting, and conflict detection during updates. The primary goal of the Object Data Source control is to create, read, update, delete (CRUD).
It is simply a tool; a powerful tool indeed but not necessarily ideal for every situation.
The Object Data Source control is particularly suited for declarative programming and, in general, all those scenarios where your information fits well in the control s programming interface.
Search for objectdatasource updating input parameters:
String, customer ID); Parameter obj GPDatabase Parameter = new Parameter("Database", Db Type.