在ItemDataBound事件中寫If e.Item.ItemIndex <> -1 then
e.Item.Attributes("onmousedown") = "this.name=this.style.backgroundColor;this.style.backgroundColor='#CCCCFF';"
End If
e.Item.Attributes("onmousedown") = "this.name=this.style.backgroundColor;this.style.backgroundColor='#CCCCFF';"
End If
解决方案 »
- 页面载入时动态加载一棵树后,如何默认选中根节点?
- .net局域网视频播放问题
- 购物车逻辑及控件代码实现
- repeater中的链接问题?求解
- 一个不太会讲话,交际的开发人员未来的路在哪?相信大家都有这样的问题
- [常见问题解答-安装和部署]错误: 无法生成项目输出组“内容文件来自*****(活动)”,大家来讨论下吧
- 如何让一个服务器上的Excel文件,被用户下载到客户机上??
- 移动Link控件前添加图标怎么做
- 问一个初学问题
- 计划用ASPX文件逐渐升级原来的ASP论坛程序,怎样共享ACCESS数据库连接?
- 用户控件问题,我想在用户控件里建立一个button控件,而button控件事件在aspx响应,请教,该怎么做
- 如何对dropdownlist 是否选择作出验证?就像textbox未输入立刻有提示
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes["onmouseover"]="this.name=this.style.backgroundColor;this.style.backgroundColor='yellow';";
e.Item.Attributes["onmouseout"]="this.style.backgroundColor=this.name;";
}
}