帮助显示数据库中的Web内容(SQL Server) [英] help to display the web contents from the database (sql server)
本文介绍了帮助显示数据库中的Web内容(SQL Server)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个管理员页面.在我有代码的地方添加说明,产品名称和产品图片.
.我想知道hoe从页面检索中检索数据库中的所有产品.
我想知道如何做到这一点..我是否需要制作网格并在网格上显示产品.请给我一些建议.
请帮助我,我在从数据库检索和显示数据方面有些困惑.
i have an administrator page. where i have a code add description , product name and image of a product .
. i want to know that hoe to retrieve all products from the database as the page load.
i want to know how to do this.. do i have need to make a grid and show the products on grid. pls give me some suggestions on this.
pls help me i have some confusions on retieving and showing data from the database.
推荐答案
您可以采用以下两种方式
1.使用SQLDatasource和Datagrid
要使用SQLDatasource,请通读 http://msdn.microsoft.com/zh-CN/library/dz12d98w. aspx [^ ]
加载SQLdatasource之后,就可以将其绑定到Datagrid.
2.在一个类上分别查询数据库,并将其加载到数据集,然后将其绑定到网格.
http://www.beansoftware.com/ASP.NET-Tutorials/ASP. NET-SQL-Server.aspx [ ^ ]
希望这可以帮助.
-巴拉吉
You may approach the two ways as below
1. using a SQLDatasource and a Datagrid
to use SQLDatasource, read through http://msdn.microsoft.com/en-us/library/dz12d98w.aspx[^]
Once the SQLdatasource is loaded, it can be bound to the Datagrid.
2. Query DB separately on a class, and load it into a Dataset and then bind it to the Grid.
http://www.beansoftware.com/ASP.NET-Tutorials/ASP.NET-SQL-Server.aspx[^]
Hope this helps.
- Balaji
这篇关于帮助显示数据库中的Web内容(SQL Server)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文