tags:

views:

29

answers:

1

Hi All,

I have an ObjectDataSource and I want to configure it from code behind , I want to set the InsertMethod , Selectmethod from Code Behind and set it to my Business Layer files

Please help me as soon as you can

Thanks in Advance

+1  A: 

In your code behind, you can assign the SelectMethod and InsertMethod like this:

this.ObjectDataSource1.TypeName = "NamespaceName.ClassName";
this.ObjectDataSource1.SelectMethod = "SelectMethodName";
this.ObjectDataSource1.InsertMethod = "InsertMethodName";
Tim B James