This article explains how to work a Gridview on an ASP.NET web page to retrieve data from a MySQl server.
Here we have to persent an ASP.NET web page connected to the MySQL server with the help of Mysql.Data.MysqlClient. It is a connector provider which we can use with .NET framework applications. Overview Here first of all we create an ASP.NET 3.5 Website Project in Visual Studio 2008 and create a gridview ASP.NET control on to the default.aspx page. Then we build the web site project and display the data in the gridview on the default.aspx page.
Create an ASP.NET 3.5 Web Site Project Start Visual Studio 2008 and Click File > New >Web Site... to open up the New Web Site window as shown. Here we have to change the default name of the web site . I choose mysql2 as shown.
Click on the <New Data Source...> item in Choose data source. This will bring up the Data Source Configuration wizard . Here we need to choose a source of the data we are trying to bring into the application to be bound to the GridView control.
Here in this wizard several options and we will be using data from a database. Click on the Database icon as shown in the previous figure. With this we will be specifying an instance of SQLDataSource1 as our source of data. Click OK.
After the ok button the next window shown here. Here we will try to establish a connection to the data source. In the combo-box shown you may see some of the existing connections you have previously established one of which may initially show up. Here in we will be making a new connection. Click the New Connection... button.
This brings up the Add Connection window which gets displayed with the default data source, the Microsoft SQL Server Compact 3.5 as shown.
Printing in C# Made Easy