我们自己观察 这是由两个重复项组成的 重复项包含重复项 而重复项的数据源是由订单号决定 即父Repeater的某数据源字段

protected void Repeater1_ItemDataBound1(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rep = e.Item.FindControl("Repeater2") as Repeater;//找到里层的repeater对象
Student student = e.Item.DataItem as Student;
int StudentNo = Convert.ToInt32(student.StudentNo); //获取填充子类的id
rep.DataSource = StudentManager.GetAddressByStudentNo(StudentNo);
rep.DataBind();
}
}
如果使用DateSet数据源的时候 要获取StudentNo这种主键 可以通过DataRowitem

Repeater嵌套的更多相关文章

  1. Repeater 嵌套,子级Repeater获取 父级Repeater 中的值

    第一种方法,子级Repeater中绑定父级的某个字段: <%# DataBinder.Eval((Container.NamingContainer.NamingContainer as Rep ...

  2. Repeater嵌套(灵活的)

    页面代码 <form id="form1" runat="server"> <asp:Repeater ID="rptCategor ...

  3. Repeater嵌套Repeater并取得嵌套Repeater里面的控件

    前台代码:    <asp:Repeater ID="RepeaterScene" runat="server" OnItemDataBound=&quo ...

  4. ASP.NET Repeater嵌套Repeater实现菜单加载

    在KS系统中要实现从数据库中读取界面权限文件实现菜单.界面的动态加载. 效果图: ASP.NET界面代码 <div id="menu-container"> <a ...

  5. 关于Repeater嵌套绑定的问题

    前台代码: <div id="firstpane" class="menu_list">                <asp:Repeat ...

  6. Repeater嵌套绑定Repeater

    前台Html代码 <asp:Repeater runat="server" ID="rpList" OnItemDataBound="rpLis ...

  7. 转:Repeater嵌套绑定Repeater以及内层调用外层数据

    <table border=" style="margin-bottom: 5px" width="100%"> <asp:Repe ...

  8. DataList与Repeater嵌套绑定

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.cs&quo ...

  9. asp.net:repeater嵌套(常用于新闻等在首页归类显示)

    using System;using System.Configuration;using System.Collections.Generic;using System.Linq;using Sys ...

  10. Repeater嵌套gridview

    前台:<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSour ...

随机推荐

  1. Django之视图层与模板层

    目录 视图层 小白必会三板斧 HttpResponse render redirect JsonResponse 前后端分离 FBV CBV 给CBV加装饰器 模板层 模板语法 模板传值 过滤器 语法 ...

  2. 《Java基础知识》Java静态内部类、匿名内部类、成员式内部类和局部内部类

    内部类可以是静态(static)的,可以使用 public.protected 和 private 访问控制符,而外部类只能使用 public,或者默认. 成员式内部类 在外部类内部直接定义(不在方法 ...

  3. 【转载】Opening Robot Framework log failed

    问题: 两种方法可以解决: 1.临时解决方案 jenkins系统管理—>运行命令行,在文本里输入 System.setProperty("hudson.model.DirectoryB ...

  4. Python学习之while

    count = 0while count <= 5: print('人生苦短,我用Python!', 'count = ', count) count += 1

  5. Cesium 限制相机进入地下

    有时我们在Cesium操作时,点击鼠标中间滚轮可更改视角,有时会使相机进入地下,导致体验很差,网上说了很多中方法,效果都不好或者没效果,下面是我翻了源码找到的方法,亲测有效.如有问题可按照专栏上的联系 ...

  6. Ubuntu18.04搭建测试环境

    前言 说一下我的情况,之前由于我的云服务器数据库的root账号密码123456太简单,而在之前的博客中也泄露出了我的云服务器的IP地址,导致有人远程连接我的数据库,删除了项目数据库里的数据只剩下WAR ...

  7. 集合系列 Map(十四):WeakedHashMap

    WeakedHashMap 也是 Map 集合的哈希实现,但其余 HashMap 的不同之处在于.其每个节点的 value 引用是弱引用,可以方便 GC 回收. public class WeakHa ...

  8. UWP 利用VisualTreeHelper查找页面中的元素

    一般我们在展示数据的时候,都会采用DataTemplate的预先设置数据模板,再使用Set ItemsSource的方式进行数据绑定 这样就能满足大部分的需求. 不过有时候需要对页面已经展示出来的元素 ...

  9. 物联网架构_对AWS的Greengrass的认识与理解

    物联网架构_对AWS的Greengrass的认识与理解 一,前言: 这段时间有许多的收获,分析,还有总结,其中包括新系统的设计与开发,以及其中新技术的踩坑等等等. 但是最近真的很忙,项目的推进,面试工 ...

  10. Mvc导入

    [HttpPost] public void Import() { //获取文件 HttpPostedFileBase fileBase = Request.Files["file" ...