I’ve created a SQL server database and it’s in the App_Data folder.
I created a drop-down menu on a page that I want populate from a table in the database. But when I do ‘choose data source’ option in Visual Studio it doesn’t display the database.
Why is this?
After you click on “Choose Data Source…” and the ‘Data Source Configuration Wizard’ pops up click on the First DropDown there.
Select the “New Data Source” option.
Click on the “DataBase” icon. You can optionally add a ID for your new datasource or leave the Default ID.
Click the Ok Button. A new window will appear with the connection string configuration.
If you already have a connection string to connect to your database select it from this list. Otherwise click on the “New Connection…” Button. Follow the steps to create your connection string, or reply if you need help with this.
Continue with the wizard and select where you want the data for the DropDownList from.
Hopefully this is what you needed.
Hanlet