SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 190 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Design-time tool for configuring the ObjectDataSource control
This tool includes support for defining SELECT, INSERT, UPDATE, and DELETE operations
on the selected data source. Each tab enables you to specify which method in the underlying
Data Access Component (DAC) class to invoke to perform a data-access operation.
For example, the SELECT tab here is linked to the GetTasksByStatus method in the DAC
class. This particular method receives a boolean parameter to indicate whether you want
to find the completed tasks or the active tasks. The ObjectDataSource control invokes this
method automatically when it needs to get task data from the database; you??™ll see how it
supplies the parameter (i.e., the IsComplete boolean parameter in this example) shortly.
You have probably also noticed that there is an .xsd file in the App_Code folder of this
site. This also can be (and often is) generated with the help of the aforementioned
design-time tool of the ObjectDataSource control. The actual SQL code for the various
operations, such as SELECT and UPDATE, reside here. Part of this code is shown in
Figure 6-12.


Pages:
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202