How to bind database tables names to dropdownlist values ?
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
execute this sql query and bind the dataset to dropdown and set DataTextField to table_name
Hi,
You can also try using following query to get the tables' name
SELECT * FROM sys.tables
And then bind the value to dropdownlist. For more detailed infromation, you can refer here
http://stackoverflow.com/questions/11592266/asp-dropdownlist-databind-from-database
http://www.codeproject.com/Questions/228204/How-to-bind-all-tables-in-Database-to-dropdownlist
Hope it can help you.
沒有留言:
張貼留言