I am attempting to have a form where the user inputs data, it verifies the data, and then posts the data into a SQL database using a stored procedure and the INSERT command.
I need some assistance in using the ObjectDataSource control combined with a submit button correctly. What do I specifically have to do for the submit button to have it use the ObjectDataSource, which links to the stored procedure?
I have the TableAdapters setup in my DAL, and the function "function_spStoreData" created already.
I have the following code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="function_spStoreData" TypeName="myTableAdapters.SetNewValuesTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="FieldA" Name="MyField1" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="FieldB" Name="MyField2" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>