Please point me to the right forum if this is not correct - I do appreciate it :-)
At work we have a database that needs a table maintenance utility written in c#/aspx/webforms. The database has about 45 tables and that could change fairly frequently.
The utility needs to present the user with a drop down of all the tables in the database, (ok - easy so far. I can get this dynamically from the database to allow for addition/deletion of tables). The user chooses a table name and is presented with the data in the table. The user can edit the data, delete or insert rows, page through the data, etc. I am guessing this is a gridview.
I can get the columns for the selected table name dynamically from the database too, but I do not seem to be able to write a generic page that uses code to bind the gridview to the data and lets the user page, insert or delete rows, etc.
In the designer a sql datasource on non-changing tables this would be easy. (Point the sds at the table, write a couple of stored procedures to add/delete/select rows, etc and the job is done).
What I don't seem to be able to do is write a generic page that will cope with dynamic binding of the grid to the database. i want to write a page that is fairly 'decoupled' from changes in the database but will still be able to provide a useful table-maintenance type tool.
View Complete Post