"There's a second ObjectDataSource used to handle the data retrieval, inserts, and updates from the bottom DetailsView. All parameters for the insert and update are automatically inferred from the DetailsView's fields."
How is this possible? Is it because the params for the actual "UpdateCategory" and "InsertCategory" methods in the Category class are spelled the same way as the string params for the "Bind" and "Eval" methods (managecategories.aspx)?
If so, then this "matching" process is case-insensitive, correct?
I will be more specific. For example, that ObjectDataSource's chosen insert method looks like this:
public static int InsertCategory(string title, int importance, string description, string imageUrl)
If ASP.NET passes values from the input TextBoxes to that method, how does ASP.NET automatically know exactly which input value must go to which parameter, in the above method? What will happen if I change the order or spelling of the parameters in the above
method?
oooshola
Member
36 Points
24 Posts
Automatically inferred parameters?
May 29, 2007 08:36 PM|LINK
In chapter 5, on page 244, it says:
"There's a second ObjectDataSource used to handle the data retrieval, inserts, and updates from the bottom DetailsView. All parameters for the insert and update are automatically inferred from the DetailsView's fields."
How is this possible? Is it because the params for the actual "UpdateCategory" and "InsertCategory" methods in the Category class are spelled the same way as the string params for the "Bind" and "Eval" methods (managecategories.aspx)?
If so, then this "matching" process is case-insensitive, correct?
I will be more specific. For example, that ObjectDataSource's chosen insert method looks like this:
public static int InsertCategory(string title, int importance, string description, string imageUrl)
If ASP.NET passes values from the input TextBoxes to that method, how does ASP.NET automatically know exactly which input value must go to which parameter, in the above method? What will happen if I change the order or spelling of the parameters in the above method?