Click here to Skip to main content
15,920,669 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I am new to this development.

I have a sql table and I am storing html table in one of the column. Also I have 'startdate' and 'enddate' columns in that table.
in web page I used gridview and binding(sqldatasource) this table to display my html table is fine but how can I write my condition to show this table only 15 days and then it need to be hide.
Posted
Comments
Sergey Alexandrovich Kryukov 23-Sep-13 22:05pm    
Any questions?
—SA

Store the current date in the Web.Config file.
Keep checking against this date.

Write code to show/hide gridview based on date.
Once the difference is the required amount, hide the gridview.
 
Share this answer
 
You should create a store procedure to get what you want (only 15 days data), then binding it to gridview.
You can refer to google.
 
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