惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
博客园 - 【当耐特】
NISL@THU
NISL@THU
IT之家
IT之家
博客园 - 叶小钗
M
MIT News - Artificial intelligence
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
量子位
The Register - Security
The Register - Security
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
W
WeLiveSecurity
S
Security @ Cisco Blogs
Apple Machine Learning Research
Apple Machine Learning Research
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
美团技术团队
J
Java Code Geeks
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
腾讯CDC
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
人人都是产品经理
人人都是产品经理
Forbes - Security
Forbes - Security
SecWiki News
SecWiki News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
S
Secure Thoughts
T
Threat Research - Cisco Blogs
P
Privacy & Cybersecurity Law Blog
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
Recorded Future
Recorded Future
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
V
Visual Studio Blog
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
O
OpenAI News
Webroot Blog
Webroot Blog
Hacker News: Ask HN
Hacker News: Ask HN

博客园 - sojay

凡客诚品的跨域获取cookies方法 jquery 飞入购物车效果 SQL2005 中 &quot;SQL_Latin1_General_CP1_CI_AS&quot; 和 &quot;Chinese_PRC_CI_AS&quot; 之间的排序规则冲突 asp.net下载文件的常用方法大全 - sojay - 博客园 IE8下ewebeditor编辑器不能使用的解决办法 - sojay - 博客园 Asp.net SEO优化,针对<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value=""> - sojay 在使用UpdatePanel时JS对话框出错的解决办法。 获取Repeater中Footer/HeaderTemplate 中的控件 用css进行导航定位 导航栏标签定位 - sojay - 博客园 (转)才几百K的eWebEditor v4.6 For asp.net编辑器 各种 Lightbox 效果的实现 XP中IIS“http500”错误的终极解决方法 (原)ASP.NET中的单引号和双引号 - sojay - 博客园 Application, Session, Cookie, Viewstate, Cache对象用法和区别(转) 转载 .NET牛人应该知道些什么?备忘 学习 应用 我的毕业设计 修改MD5加密 提高网站安全 对google个性主页的拖拽效果的js的完整注释
repeater嵌套 - sojay - 博客园
sojay · 2009-04-10 · via 博客园 - sojay

 1    <asp:Repeater ID="repeaterParent" runat="server"  OnItemDataBound="repeaterParent_ItemDataBound">
 2        <ItemTemplate>
 3            <!---------------------------------------------------------------------------------------->
 4            <table width="186" border="1" class="MenuTB">
 5                <tr>
 6                    <th style="cursor:pointer;">
 7                        <img src="images/comments.gif" / alt=""><%#Eval("MenuText"%>
 8                    </th>
 9                </tr>
10                <tr style="display:none">
11                    <td>
12                        <ul>
13                            <asp:Repeater ID="repeaterMinMenu" runat="server">
14                                <ItemTemplate>
15                                    <li>
16                                        <href="<%#Eval("MenuLink") %>" target="frmContent"><%#Eval("MenuText"%></a></li>
17                                </ItemTemplate>
18                            </asp:Repeater>
19                        </ul>
20                    </td>
21                </tr>
22            </table>
23            <!----------------------------------------------------------------------------------------->
24        </ItemTemplate>
25    </asp:Repeater>

C#:

 1        protected void BindParentRepeaterData()//绑定父repeater数据
 2        {
 3            string SqlGetParentMenu = @"SELECT MenuId,MenuText FROM website_Menu WHERE ParentId IS NULL OR ParentId=0";
 4
 5            DataTable dtGetParentMenu = SqlHelper.ExecuteDataset(Configurations.RemoteConnectionString, CommandType.Text, SqlGetParentMenu).Tables[0];
 6
 7            repeaterParent.DataSource = dtGetParentMenu;
 8
 9            repeaterParent.DataBind();
10        }

11
12
13        protected void repeaterParent_ItemDataBound(object sender, RepeaterItemEventArgs e)
14        {
15            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
16            {
17                int MenuId = Convert.ToInt32(((DataRowView)e.Item.DataItem).Row["MenuId"]);
18
19                Repeater repeaterMinMenu = (Repeater)e.Item.FindControl("repeaterMinMenu");
20
21                if (repeaterMinMenu != null)
22                {
23                    string SqlGetMinMenu = string.Format(@"SELECT A.MenuId,A.ParentId,A.MenuText,A.MenuLink   FROM dbo.website_Menu A
24                                                            INNER JOIN dbo.website_RolesMenu B 
25                                                            ON A.MenuId = B.MenuId  AND A.ParentId = {0}
26                                                            INNER JOIN dbo.User_UsersRoles C 
27                                                            ON B.RoleId = C.RoleId AND C.UserId = {1}
28                                                            GROUP BY A.MenuId,A.ParentId,A.MenuText,A.MenuLink ",MenuId,Kuqu.Components.Tickets.UserInfo.Id);
29
30                    DataTable dtGetMinMenu = SqlHelper.ExecuteDataset(Configurations.RemoteConnectionString, CommandType.Text, SqlGetMinMenu).Tables[0];
31
32                    repeaterMinMenu.DataSource = dtGetMinMenu;
33
34                    repeaterMinMenu.DataBind();
35                }

36            }

37        }