Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用此行显示 24 小时格式:
Text='<%# Bind("Appointment", "{HH:mm}")
那么它将如何格式化以显示例如 16:40 而不是 4:40?
如果您不需要绑定它,请尝试:
Text='<%# string.Format("{0:HH:mm}", Eval("Appointment"))%>'
否则我想你可以更新 OnDataBound 事件中的字段值。