在 asp.net 的数据列表中使用日历
我正在使用数据列表显示数据库中的数据,我有三个数据类型为日期时间的字段,我正在寻找的是在数据列表中显示日历,选择日期(来自数据库),用户也可以使用该日历要更改日期,单击更新时应更新数据库中的日期字段,
是否有任何方法可以将日历集成到数据列表中以执行上述要求。
任何帮助或建议将不胜感激
I am using datalist to display data from the database,I have got three fields whose Data Type is datetime, What I was looking for is to display a calendar in the datalist , with date selected(coming from database), Also the user can use that calendar to change date , which should update the date field in the database when update is clicked,
Is there any way to integrate calendar in the datalist as perform the above requirements.
Any assistance or suggestions will be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我并不是专门推销 Jquery-UI,因为有很多 js 驱动的日历,但我已经在许多不同的场景中使用它,并且我确信它可以在您可以想象的任何场景中工作:http://jqueryui.com/demos/datepicker/
该控件具有事件,特别是 onClose 和 onSelect。当这些发生时,你就有了约会。您可以通过 AJAX 或表单提交(回发)将其发送到服务器。
此外,ASP.NET 还具有支持回发的内置日历控件(如果您正在寻找该控件)。
I'm not specifically promoting Jquery-UI, as there are many js-driven calendars out there, but I've been using it in many different scenarios, and I'm sure it can work in whatever scenario you can imagine: http://jqueryui.com/demos/datepicker/
That control has events, in particular onClose and onSelect. When those happen, you have your date. You can send it to the server either via AJAX or via form-submit (postback).
Also, ASP.NET has a built-in calendar control that supports postbacks, if that's what you are looking for.