ASP.NET MVC 显示并自动刷新捐赠进度条

发布于 2024-09-16 11:06:29 字数 205 浏览 2 评论 0原文

我正在构建一个简单的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满天都是小星星 2024-09-23 11:06:29

您可以计算 % 并显示类似 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()).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文