标题:e.Item.ItemType
取消只看楼主
panchong
Rank: 2
等 级:论坛游民
帖 子:51
专家分:29
注 册:2009-7-1
结帖率:100%
 问题点数:0 回复次数:0 
e.Item.ItemType
下面是我在repeater里面找panel控件的代码,who帮忙解释下为什么要判断当前点击的项啊,这和找控件有什么关系啊?
 protected void Repeater1_ItemCommand1(object source, RepeaterCommandEventArgs e)
{
  
                if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
                {
                    Panel pan1 = (Panel)e.Item.FindControl("Panel1");
                    if (pan1.Visible == false)
                    {
                        pan1.Visible = true;
                    }
                    else
                    {
                        pan1.Visible = false;
                    }
                                       //datatbind(wtID4);
                }
           
}
搜索更多相关主题的帖子: Item 
2009-10-17 17:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-288912-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.834092 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved