示例#1
0
 protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     if (e.Item.ItemType == ListViewItemType.DataItem)
     {
         ImageButton db = (ImageButton)e.Item.FindControl("ibtDelete");
         ImageButton ub = (ImageButton)e.Item.FindControl("ibtAllow");
         ImageButton cb = (ImageButton)e.Item.FindControl("ibtDeny");
         Label       lb = (Label)e.Item.FindControl("fb_dateid");
         Boolean     f  = feedback.getisview(lb.Text);
         db.Attributes.Add("onclick", "return confirm('确认要删除这条留言吗?')");
         if (f)
         {
             ub.Visible = false;
             cb.Visible = true;
         }
         else
         {
             ub.Visible = true;
             cb.Visible = false;
         }
     }
 }