我如何在gridview中使用计时器.. [英] how i can use the timer in gridview..

查看:107
本文介绍了我如何在gridview中使用计时器..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在gridview中使用计时器...例如..如果网站用户上传他的产品图片进行广告...特定日期(7天或15天)......完成后期间,广告将自动删除...并保存开始时间和结束时间...

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...

推荐答案

你不是很清楚你到底是什么想要,但我最好的猜测是你的用户将上传一张图片,你会在其他页面上将该图片作为广告显示一段时间,之后你将停止显示它。



简单。



你有一个数据库表包含图像(或指向它们的指针,但是你存储它们)和两列table定义用户已支付的广告系列的开始日期和结束日期(和时间)。



在检索广告的SQL中,您限制它目前直播的广告 - 即



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.

where GetDate() between startDate and endDate





所以你永远不会显示已过期(或尚未开始)的广告



so you will never display adverts that are expired (or haven''t started yet)


这篇关于我如何在gridview中使用计时器..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆