joeylu
asked on
objectdatasource update method at code behind
I have a objectdatasource with specified UpdateParameters at page,
and I want to do the objectdatasource.update() at code behind
How do I full filled all the required updateparameters at code behind before I call the update()?
I've tried ODS1.UpdateParameters.Inse rt("cID", string123)
it didn't work, popup an error msg says "cannot find generic method "update" that has parameters (cID)
any help?
and I want to do the objectdatasource.update() at code behind
How do I full filled all the required updateparameters at code behind before I call the update()?
I've tried ODS1.UpdateParameters.Inse
it didn't work, popup an error msg says "cannot find generic method "update" that has parameters (cID)
any help?
<asp:ObjectDataSource ID="ODS1" runat="server"
OldValuesParameterFormatString="original_{0}" UpdateMethod="Update">
<UpdateParameters>
<asp:Parameter Name="cID" Type="Int32" />
<asp:Parameter Name="cName" Type="String" />
</UpdateParameters>
</asp:ObjectDataSource>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes, i was forced to use defaultvalues, but it doesn't quite the same anyway, guess there should be a better way
http://www.java2s.com/Code/ASP/ADO.net-Database/ObjectDataSourcewithselectmethoddeletemethodupdatemethodinsertmethod.htm
I hopes its helpful