Click here to Skip to main content
15,302,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have the following code for SqlDataSource:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:connectionString %>"
        <asp:ControlParameter Name="Name" ControlID="nameTxt" Type="String" />
        <asp:ControlParameter Name="ID" ControlID="idTxt" Type="Decimal" />
       <asp:ControlParameter Name="Name" ControlID="nameTxt" Type="String" />
        <asp:ControlParameter Name="ID" ControlID="idTxt" Type="Decimal" />
        <asp:ControlParameter Name="ID" ControlID="idTxt" Type="Decimal" />

Stored procedures parameters are @Name, @ID, but I get error of missing parameters when I try to call InsertDetails, UpdateDetails and DeleteDetails.

Any suggestions?

Thank you in advance.

1 solution

You need to set the InsertCommandType, UpdateCommandType and DeleteCommandType properties to StoredProcedure.
Chriz12 16-Sep-15 0:51am
Thank you:)
Derek Elliott 14-Jun-21 17:29pm
Did you get an answer to this? I have the same issue using 'Insert Parameters' to call a Stored procedure.
Richard Deeming 15-Jun-21 3:51am
The OP accepted the solution over five years ago, so this was the answer to their question.

If you have a different question, then ask a question[^]. You'll need to provide a proper description of the problem.
Derek Elliott 14-Jun-21 17:30pm
BTW... I already had a InsertCommandType

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900