Repeater:即使数据源为空也显示页脚
是否可以始终显示 ASP.NET 中继器的页眉和页脚,无论它是否不包含数据?
我很清楚,想要显示某种信息性消息的人之前已经问过这个问题,但在我的情况下,这一切都是为了向客户端提供填充完全相同的Repeater
使用页脚中的输入字段提供数据。情况可能很相似,但我一直无法弄清楚。谢谢!
Is it possible to always show the header and footer of an ASP.NET repeater, regardless if it contains no data or not?
I am quite aware that this question has been asked before by people wanting to display some kind of informative message, but in my situation, it's all about providing the client with the means to populate the very same Repeater
with data using input fields in the footer. The situations might be similar, but I haven't been able to figure it out. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一篇文章可以帮助您解决此问题,
基本上技巧就在这里:
因此,当没有项目时,您也可以填充页脚...
请参阅此处的完整文章,祝您好运。
处理 ASP.NET Repeater 控件中的空数据
I've found an article that should help you with this,
basically the trick is here:
so you populate the Footer also when there are no items...
see full article here and good luck.
Handling Empty Data in an ASP.NET Repeater control