Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
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.
Posted
Comments
Dylan Morley 20-Jun-11 11:41am    
Retrieving data from the database: This is going to be exactly the same as one of the hundreds of other threads you've posted on this subject. Do you really not know how to get the data from your database yet? The answers are in the questions you've posted!

Displaying the data: Once you've retrieved a data object, you can bind it to a grid. Have a google for ASP.Net data binding. Or have a look at one of your other questions you posted.
Parwej Ahamad 20-Jun-11 14:30pm    
Dear purchase a Asp.net book would be better than asking these type of questions. You can also look http://www.asp.net website.
[no name] 20-Jun-11 15:22pm    
Good Question!!!!! I need help with this too!
[no name] 20-Jun-11 15:49pm    
Can someone please help me! Thx

1 solution

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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900