给你个思路:for each tablerow in dataGrid.items tablerow.attributes.item("Onclick")="this.bgcolor=red"next
解决方案 »
- 一个神奇的问题
- div frameset
- 用正则表达式取数据
- 要做个网上商城 .net的 购物车是用SESSION好还是用COOKie好啊?
- 找不出错误所在,有关(ArgumentOutOfRangeException)
- 如何让asp.net2.0里的datagrid自带分页执行脚本??
- 用资源文件实现多语言,如何让用户可以自己修改显示的内容呢?
- 简单问题,立即结帖!请问如何在一个ASP.NET页面中嵌入另一个ASP.NET页面
- string 不包含tooltip的定义,并且找不到可接受类型为stirng的第一个参数的扩展方法
- 在web版treeview中如果定位一个节点?是不是用SelectedNodeIndex?
- 如何把 asp 文件升级为 asp.net ?
- 一个函数是否可以返回两个值
e.Item.Attributes.Add
("onclick","currentcolor=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
//e.Item.Attributes.Add
//("onmouseout","this.style.backgroundColor=currentcolor");
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#FFFFC0'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor")
End If