Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 21, 2007 07:48 PM by tarjoadi
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
Jun 21, 2007 07:48 PM|LINK
Well, it seems so. Besides this, I cannot give a more logical explanation.
Here is the difference between eval and bind:
Data-binding expressions are contained within
....and I have done an experiment: instead of
<%# Bind("Description") %> I have written <%# Bind("aaaaa") %>, and is not working. So.....this is the only explanation :)