我正在尝试删除gridview中所选行的数据,但我收到的错误是这样的
“必须声明标量变量”@ModelID“。”
这是我的sqldataadapter代码
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString='<%$ ConnectionStrings:myconnectionstring %>' SelectCommand="SELECT * FROM [ChannelsDataValidation] WHERE ([ModelID] = @ModelID)" DeleteCommand="DELETE FROM ChannelsDataValidation WHERE (ModelID = @ModelID)" UpdateCommand="UPDATE ChannelsDataValidation SET ChannelNumber = @ChannelNumber, DataType = @DataType, MinValue = @MinValue, MaxValue = @MaxValue, Unit = @Unit, Name = @Name WHERE (ModelID = @ModelID)">
<DeleteParameters>
<asp:Parameter Name="ModelID"></asp:Parameter>
</DeleteParameters>