【问题标题】:Nested Repeater using c# asp.net web forms使用 c# asp.net web 表单的嵌套中继器
【发布时间】:2017-08-07 06:44:39
【问题描述】:

实际上,我没有使用嵌套中继器 asp.net c# 获得任何逻辑。

下面是我的sql表

DocID   Title                FileAttachment                      Session
69053   s3 time table       s3 time table_UserDetails.xls        Session-3
1616    Notice              Notice_UserDetails.xls               Session-1
67792   recruiment          recruiment_UserDetails.xls           Session-2
1616    Tesing              Testing_UserDetails.xls              Session-1

我希望在嵌套中继器中像下面的数据会话一样输出。

  Session-1
   Notice               Notice_UserDetails.xls               Session-1
   Tesing               Testing_UserDetails.xls              Session-1
  Session-2
   recruiment           recruiment_UserDetails.xls           Session-2
  Session-3
   s3 time table        s3 time table_UserDetails.xls        Session-3

或者任何其他实现上述输出的逻辑和 Session-1 应该是通过 Session-1、Session-2 和 Session-3 升序的第一顺序。

【问题讨论】:

  • 关于上述问题的任何想法? @Habeeb

标签: c# asp.net webforms repeater


【解决方案1】:

我建议使用“会话”列上的GROUP BY 从 SQL DB 进行查询。 然后在转发器中有一个带有您需要的样式的自定义模板(每个组的标题和会话名称)。

找到下面的链接以参考如何按数据分组并在Repeater中使用它。 您将不得不根据您的要求进行定制。但你会知道如何前进。

http://www.dotnetcurry.com/ShowArticle.aspx?ID=206

【讨论】:

猜你喜欢
  • 2010-10-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多