A
Aamir Ghanchi
Hi,
Why does the Update method of an ObjectDataSource class requires
parameters for each of the Bind input controls of a FormView?
I have a class (say MyObjectDataSource) that is being used as an
ObjectDataSource for a FormView control. MyObjectDataSource has public
properties that correspond to db table columns and are also used to <
%# Bind("")%> Input controls in the formview declaratively.
There is an Update method in MyObjectDataSource that requires a
parameter for each and every Bind server controls. Otherwise I get a
server error that reads something like this
ObjectDataSource 'MyObjectDataSource' could not find a non-generic
method 'MyUpdateMethod' that has parameters: param1, pram2 and on and
on till it lists all the public properties to which the server
controls are bind.
I thought It was a given that the Update method should inherently know
about the Bind controls as they are bind to the public properties in
the same class of which the Update method is part of.
Am I doing something wrong or is there a need for design improvement
in Asp .Net in this regard.
thanks!
Why does the Update method of an ObjectDataSource class requires
parameters for each of the Bind input controls of a FormView?
I have a class (say MyObjectDataSource) that is being used as an
ObjectDataSource for a FormView control. MyObjectDataSource has public
properties that correspond to db table columns and are also used to <
%# Bind("")%> Input controls in the formview declaratively.
There is an Update method in MyObjectDataSource that requires a
parameter for each and every Bind server controls. Otherwise I get a
server error that reads something like this
ObjectDataSource 'MyObjectDataSource' could not find a non-generic
method 'MyUpdateMethod' that has parameters: param1, pram2 and on and
on till it lists all the public properties to which the server
controls are bind.
I thought It was a given that the Update method should inherently know
about the Bind controls as they are bind to the public properties in
the same class of which the Update method is part of.
Am I doing something wrong or is there a need for design improvement
in Asp .Net in this regard.
thanks!