S
SAL
Does anyone know how to re-use the asp:ObjectDataSource control?
What I want to do is add ONE asp:ObjectDataSource control to my Web form,
then BIND it to MULTIPLE DropDownList boxes in the Code Behind, since the
DropDownList boxes will all reference the same Stored Procedure. However,
you can not do that since that ObjectDataSource is already bound to another
control on the form. The only way I know to do this is to add multiple
asp:ObjectDataSource controls to the form with their own unique ID, which
seems redundant if all the ObjectDataSources will use the same store
procedure with the same parameters.
In the Code Behind, how can I create a NEW instance of the
asp:ObjectDataSource control for each of the DropDownList boxes I want to
BIND to?
What I want to do is add ONE asp:ObjectDataSource control to my Web form,
then BIND it to MULTIPLE DropDownList boxes in the Code Behind, since the
DropDownList boxes will all reference the same Stored Procedure. However,
you can not do that since that ObjectDataSource is already bound to another
control on the form. The only way I know to do this is to add multiple
asp:ObjectDataSource controls to the form with their own unique ID, which
seems redundant if all the ObjectDataSources will use the same store
procedure with the same parameters.
In the Code Behind, how can I create a NEW instance of the
asp:ObjectDataSource control for each of the DropDownList boxes I want to
BIND to?