Click here to Skip to main content
15,891,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to show the latest information add in the database on the main page of my website, ca any one help me for the code or how can i do this in asp.net database MSSql 2005,

Can i display this using gridview
Posted
Updated 11-May-10 19:57pm
v3
Comments
Michel Godfroid 6-May-10 4:01am    
What database? Does it have time stamps?

Do you have a date created/updated on the tables? If you have, you can use these to order your query. Alternatively, you could order by the identity column, but this will only show where items have been inserted - it won't display where items have been updated.
 
Share this answer
 
You haven't given us enough info to answer the question accurately, but if your table has a identity column, you can simply do this :

select top 1 * from table order by identitycolumn desc
 
Share this answer
 
Make a method that silently checks the changes in data base and if there is any changes reflect changes in the page..use AJAX Update Panel for this.

Thanx
Nitesh Meshram
 
Share this answer
 

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