.NET经验心得探讨社区  
请在这里用键盘敲打出属于你的地位!
在DataGrid的绑定事件里写!
  private void Mdb_Dealer_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  {
       if((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
       {
            e.Item.Attributes.Add            ("onmouseover","currentcolor=this.style.backgroundColor;this.style.backgroundColor='#ECECEC'");
            e.Item.Attributes.Add("onmouseout","this.style.backgroundColor=currentcolor");
            e.Item.Attributes.Add("onclick","window.open('DealerRevise.aspx?DEALER_ID=" + e.Item.Cells[1].Text +"&PageIndex="+Mdb_Dealer.CurrentPageIndex+"','_blank','menubar=no,resizable=no,status=yes,location=no,height=600,width=800')");
       }
  }
posted on 2006-02-08 13:35  苦涩的咖啡  阅读(342)  评论(0)    收藏  举报