User1332450904 posted
I have a Gridview that has as datasource the standard SqlDataSource1. A user can change the query based on a dropdown and this works fine. But when there is no result the whole gridview disappears. This is the code that gets activated when the dropdown
is changed, it's fairly simple but to just give an example on what I am doing:
SqlDataSource1.SelectCommand = "SELECT * from Kist where Rij ='" + DropDownList1.Text + "'";
GridView1.DataBind();
If there are no results with the 'Rij' column the Gridview disappears. I want it to stay, so the user does not have to refresh the page to be able to use it again.
By the way, yes I know my query is easy recipe for a SQL Injection. The project is only for private use.