I made a quick gridview, bound it to a datasource, put in a select statement it works.
I then went into the datasource, and to the delete tab, and put some delete code in, that ends with where blahUID = @blahUID
I checked the enable deleting checkbox, which added a Delete textlink on each line of the gridview.
However when I press it, it errors because @blahUID is not defined - how can I define it?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="...snipped..."
SelectCommand="SELECT [CategoryUID], [WordUID], [CategoryName], [Colour] FROM [Category] WHERE ([WordUID] = @WordUID);"
DeleteCommand="delete from [Category] where CategoryUID = @CategoryUID">
<SelectParameters>
<asp:ControlParameter ControlID="lstWords" Name="WordUID"
PropertyName="SelectedValue" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="CategoryUID" />
</DeleteParameters>