<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:AdNetConnectionString %>"
SelectCommand="SELECT AdCampaign.ID As [ID], AdCampaign.CampaignName FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)"
DeleteCommand="DELETE FROM [AdCampaign] WHERE [ID] = @ID" >
<SelectParameters>
<asp:SessionParameter Name="EmailAddress" SessionField="EmailAddress" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
</asp:SqlDataSource>
In tge previous code.
When pressing on the delete button, error says:
Must declare the scalar variable "@ID"