I have a SqlDataSource which helps a Listview to Insert/Delete new data. But, I don't want to show the existing data to the Listview using this SqlDataSource. Only the newly inserted records to be shown. But, this shows everything on the Listview. If I remove the SelectCommand, Even the newly inserted rows won't be shown.
<asp:SqlDataSource ID="VendorSOAPaymentsInnerDS" runat="server"
ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
InsertCommand = "INSERT INTO VendorSOAPayments ( VendorSOAID, PaymentVoucherID, PaymentAmount) VALUES( @VendorSOAID, @PaymentVoucherID, @PaymentAmount)"
SelectCommand= "SELECT A.VendorSOAPaymentID, A.PaymentVoucherID, B.SubProjectID, B.StatementBreakDown, A.PaymentAmount, C.SubProjectCode, C.SubProjectName FROM VendorSOAPayments A INNER JOIN VendorSOA B ON A.VendorSOAID = B.VendorSOAID INNER JOIN SubProject C ON B.SubProjectID = C.SubProjectID WHERE A.PaymentVoucherID = @PaymentVoucherID AND B.Vendor_EntityID = @VendorID "
DeleteCommand = "DELETE VendorSOAPayments WHERE VendorSOAPaymentID = @VendorSOAPaymentID" >
<SelectParameters>
<asp:ControlParameter ControlID="ListPayVoucherID" Name="PaymentVoucherID" PropertyName="Value" />
<asp:ControlParameter ControlID="vendorSelectID" Name="VendorID" PropertyName="Value" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="VendorSOAID" />
<asp:Parameter Name="PaymentAmount" />
<asp:ControlParameter ControlID="ListPayVoucherID" Name="PaymentVoucherID" PropertyName="Value" />
</InsertParameters>
</asp:SqlDataSource>