Here we have to describe the process of an ASP.NET web site and use of the MySQL database. Display the data in GridView control. In this article we will create an ASP.NET website. By using the DropDownList and with the help of the GridView. So, Creating an ASP.NET web site. These steps help us to work with LINQ and ASP.NET. So we have to follow these steps given below.Step 1 : Open the Visual Studio menu>select>File>New>WebSite.Step 2 : In Visual Studio select ASP.NET Web Site. Click Ok.Step 3 : After Click we can see this page in either source or design view. Click the design view.Step 4 : In the design view panel, enter some text (Test My Application) in the blank page.Step 5 : Click on toolbox. Find the DropDownList. Drag and drop on the web page.Step 6 : In a DropDownList context menu the enable AutoPostBack, check box is enabled.Step 7 : Again in the Toolbox find and select the GridView control.Step 8 : Drag and drop the GridView control to a location on the page. By default see this page as below.Step 9 : We have to select columns in our GridView and choose database.Step 10 : In the GridView properties window we can set many of the formatting properties.Step 11 : Build the project and browse to the Default.aspx page on the browser to display the page as shown below.
Here are some useful resources.
Arjun Panwar is a software developer working on Windows 8 platform and metro style apps.
C# Corner. All contents are copyright of their authors.