Click here to Skip to main content
15,881,813 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how i can use the timer in gridview...eg..if user of site going to upload the image of his product for advertising...for particular day (7 days or 15 day)...after completion of the period ,advertise will be automatically delete...and save the start time and end time...
Posted

1 solution

You aren't very clear with exactly what you want, but my best guess is that your user will upload an image, and you will display that image on other pages as an advert for a period of time, after which you will stop displaying it.

Simple.

You have a database table containing the images (or pointers to them, however you are storing them) and two columns on that table define the start and end date (and time) of the 'campaign' the user has paid for.

In the SQL that retrieves adverts, you limit it to adverts that are currently 'live' - i.e.

SQL
where GetDate() between startDate and endDate


so you will never display adverts that are expired (or haven't started yet)
 
Share this answer
 
Comments
Raj@88 22-Mar-13 0:09am    
sir can u send me any link or example..
Raj@88 22-Mar-13 0:10am    
am using accsee database
_Maxxx_ 22-Mar-13 0:31am    
NO I can't send you a link or example - I don't have one and can only google as well as you.

I don't know what accsee database is - I assume you mean Access but if you expect to get any help from forums such as this you need to be much more accurate and also at least try something yourself - not just ask others to write stuff for you.

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