如题:想增加一个让它好看点。
解决方案 »
- .net中如何生成7位或7位以下的时间流水号且唯一?
- 对girdview中的复选框进行勾选,如何在函数中更改对应的checked的值
- 使用Response.Redirect重定向的页面,不能触发button事件
- 如何在ASPX页面中使用调用SqlDataSource的查询结果
- ASP.NET2.0中UpdatePanel和datalist刷新
- 当点击落treeview目录树中的一个节点时,如何让他对应的节点内容显示在gridview中!!就像点csdn目录树节点显示相应内容一样
- 使用微软的TreeView控件有的客户端有脚本错误的问题
- Freetextbox 图文混排怎么实现?就像添加表情那样。
- 求救!用asp.net语言自己编出来的组件位于.netframework的哪层?
- 困扰了我多时的问题——viewstate
- 集合问题!不明了之处,望人指教
- 淘宝店铺装扮用的什么技术实现
{
if (e.Item.ItemType == DataControlRowType.DataRow)
{
e.Item.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='gray'");
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
} }
你先在前台直接写上,不一定非要在后台设置
<tr onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor=''">
<asp:DataList ID="DataList1" runat="server" DataKeyField="id" ........">
<ItemTemplate>
<div onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#D9DAE8'" onmouseout="this.style.backgroundColor=currentcolor">
...............
...............
</div>
</ItemTemplate>
</asp:DataList>