How do you guys update let's say for example a FormView with an ObjectDataSource source. The DataObjectTypeName is a class which I have already marked with a DataObject attribute. Now, I want to customize the update process and add some custom data to the parameter. What do we need to do so?
Example: I have a BLL class which let's call it "ProductsBLL" and a data class "Product".
I declare the following ObjectDataSource control:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Product" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetProduct" TypeName="Assembly.ProductsBLL"
UpdateMethod="UpdateProduct">
<UpdateParameters>
<asp:Parameter Name="product" Type="Object" />
</UpdateParameters>
<SelectParameters>
<asp:QueryStringParameter Name="productID" QueryStringField="ProdID" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
Given that the Update method in the ProductsBLL class accepts a Product object as a parameter. Now, before the update takes place, I want to add a custom data to the Product parameter. How can I do that?