ASP.NET MVC 显示并自动刷新捐赠进度条
我正在构建一个简单的 ASP.NET MVC 站点来记录和跟踪捐赠。我们设定的目标是 2,500,000 美元,并将在收到捐款后将其输入数据库。我们需要在主页上有一个仪表或进度条,以显示它们与目标的接近程度。现在我有一个partialView,其中的donationGoal 和totalDonationAmount 为小数。我可以使用什么来将其显示为条形图并按设定的时间间隔自动刷新?提前致谢。
I am building a simple ASP.NET MVC site to record and track donations. We have a set goal of $2,500,000 and will be entering donations into a database as they come in. We need to have a meter or progress bar on the homepage to show how close they are to the goal. Right now I have a partialView that has the donationGoal and the totalDonationAmount as decimals. What can I use to display this as a bar and automatically refresh at set intervals? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以计算 % 并显示类似 http://jqueryui.com/demos/progressbar/ 和使用 javascript (
setInterval()
) 刷新它。You can calculate % and display something like http://jqueryui.com/demos/progressbar/ and refresh it with javascript (
setInterval()
).