- Create an ODBC data source for the database
- In default.aspx web form drag and drop a Gridview control
- Click on the top right of the Gridview control. Select "new data source". On the page will appear a window with various icons. Select "Database". Click OK.
- Now 'll appear SqlDataSource1 control. Click on "New connection" button.
- It'll appear a window. Click on Edit button and select "Other". In the label It'll appear ".Net Framework Data Provider for ODBC"
- Below click the option button "Use connection string". Click on "Generate.." button, and select the tab "Computer data source". Then select your data source name. Then OK. Next.
- Click on the "Specify a stored procedure or a customized SQL statement" option button. Otherwise you may get a token error message because of the square brackets for a string without white spaces.
- You may use "select" statement. Write the select statement. Next. Click on "Test query" button.
- Now you should see your table.
- For further test start the debug.
Posted by dragon on Friday, 30 September 2011
With Visual Web Developer, from Microsoft: