Code代码片断(5do8)

GDI+控件线程IO流ADO.NET接口类,函数语法

新主题
c# cache与数据库映射
建立 CLR Stored Procedur...
access left join 两个
lucene.net提高查询速度
DataList 页面跳转
OnItemDataBound绑定事件
sql事务执行
SqlParameter添加数据
说话自由

首页 » .NET/C# » ADO.NET »

OnItemDataBound绑定事件

标签: OnItemDataBound ListItemType DataRowView
protected void DoItemBound(Object Sender, RepeaterItemEventArgs e)
    {

        // This event is raised for the header, the footer, separators, and items.

        // Execute the following logic for Items and Alternating Items.
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            int adminIds = Int32.Parse(((DataRowView)e.Item.DataItem)["IsAudited"].ToString());
            if (adminIds == 1)
            {
                ((Button)e.Item.FindControl("butRpAuditing")).Visible = false;

            }else
            {
                ((Button)e.Item.FindControl("butRpNotAuditing")).Visible = false;
            }
        }
    }

ccdot写于2008-9-8 12:39:27

如果愿意,请留下你观点或者感受...
称呼*
内容*
验证码*