Sunday, June 19, 2016
The GridView data grid control is probably the most popular and flexible data grid control in the ASP.NET arsenal. In this tutorial we will create a new GridView data grid on a web form.
Here are the steps:
1. Click on the "Design" tab in main window of Visual Studio
2. Click on the "Toolbox" tab, then expand the "Data" node, then drag the "GridView" data control to the Design surface. The Design Surface is the big window in the middle of Visual Studio.
3. Click on "Toolbox" tab again, this time drag the "SqlDataSource" control to the Design Surface
4. Click on the ">" button next to SqlDataSource1 control, then select "Configure Data Source"
5. Click on the "New Connection" button
6. Select your "Server name", SQL Server should pick up your database server automatically if it's on a local machine, but if it doesn't type in (local) in the "Server name" field.
16. The following into the SELECT statement window
Products ON Categories.CategoryID = Products.CategoryID
Here are the steps:
1. Click on the "Design" tab in main window of Visual Studio
2. Click on the "Toolbox" tab, then expand the "Data" node, then drag the "GridView" data control to the Design surface. The Design Surface is the big window in the middle of Visual Studio.
3. Click on "Toolbox" tab again, this time drag the "SqlDataSource" control to the Design Surface
5. Click on the "New Connection" button
7. Click "OK"
8. A new connection has been defined in your web application
9. Click "Next", leave the checkbox check for the option "Yes, save this connection as:", "NorthwindConnectionString"
10. Click "Next"
11. On the "Configure the Select Statement" window select "Specify a custom SQL statement or stored procedure"
12. Click "Next"
13. Click on the "Query Builder" button"
14. On the "Add Table" window select the "Categories" and "Products" table and then click "Add", then click "Close"
15. In "Query Builder" the two tables and their relationships are displayed
SELECT Products.ProductName, Products.UnitPrice, Categories.CategoryName, Categories.Description
FROM Categories INNER JOINProducts ON Categories.CategoryID = Products.CategoryID
17. Click "OK"
18. Click "Next"
19. Click "Finish"
20. Click on the ">" button next to the GridView1 control, and for the "Choose Data Source" dropdown list chose "SqlDataSource1"
21. Right-click on the "Default.aspx" file then select "Set as Start Page"
22. Press F5 to run the page, the GridView will be displayed on the browser page.
Source Code: GridViewWebSite.zip to download the zip file click on File -> Download
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
DevOps
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Software Development
Unix
View
Web Forms
WildFly
XML
cshtml
githu
The custom web development is not a piece of cake, to get expertise in ASP.net students also doing work hard and some students after studies visits different blog sites to read about the development just like how to develop white label bitcoin exchange software and through the blogs they also collect huge information.
ReplyDeleteĐặt vé tại phòng vé Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ giá rẻ
vé máy bay từ mỹ về việt nam hãng ana
lich bay tu duc ve viet nam
vé máy bay giá rẻ từ nga về việt nam
các chuyến bay từ anh về việt nam
chuyến bay từ pháp về việt nam hôm nay
chuyến bay chuyên gia trung quốc
Aivivu chuyên vé máy bay, tham khảo
ReplyDeleteVé máy bay đi Mỹ
vé máy bay từ mỹ về vn
chuyến bay từ đức về hà nội hôm nay
dịch vụ vé máy bay tại nga
các chuyến bay từ anh về việt nam
chuyến bay từ Paris về Hà Nội
Chi phí cho chuyên gia nước ngoài