In this sample we have used the VB.Net code for binding the data to the ASP.Net GridView control. The Northwind SQL database has been used to display the categoryId, categoryName and description retrieved from the categories table. In the VB.Net code for Gridview databinding we have used the following class objects to specify the data source using connectionstring, sql command to fetch the required data and a dataset to store the retrieved records.
DataBinding Elements Used
See the sample below to understand the output of the VB.Net GridView Databinding code: